VTK  9.3.20240419
vtkKCoreDecomposition.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
28 #ifndef vtkKCoreDecomposition_h
29 #define vtkKCoreDecomposition_h
30 
31 #include "vtkGraphAlgorithm.h"
32 #include "vtkInfovisCoreModule.h" // For export macro
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkIntArray;
36 
37 class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm
38 {
39 public:
41 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  vtkSetStringMacro(OutputArrayName);
52 
54 
60  vtkSetMacro(UseInDegreeNeighbors, bool);
61  vtkGetMacro(UseInDegreeNeighbors, bool);
62  vtkBooleanMacro(UseInDegreeNeighbors, bool);
64 
66 
72  vtkSetMacro(UseOutDegreeNeighbors, bool);
73  vtkGetMacro(UseOutDegreeNeighbors, bool);
74  vtkBooleanMacro(UseOutDegreeNeighbors, bool);
76 
78 
83  vtkSetMacro(CheckInputGraph, bool);
84  vtkGetMacro(CheckInputGraph, bool);
85  vtkBooleanMacro(CheckInputGraph, bool);
87 
88 protected:
91 
93 
94 private:
95  char* OutputArrayName;
96 
97  bool UseInDegreeNeighbors;
98  bool UseOutDegreeNeighbors;
99  bool CheckInputGraph;
100 
101  // K-core partitioning implementation
102  void Cores(vtkGraph* g, vtkIntArray* KCoreNumbers);
103 
105  void operator=(const vtkKCoreDecomposition&) = delete;
106 };
107 
108 VTK_ABI_NAMESPACE_END
109 #endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:340
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:144
Compute the k-core decomposition of the input graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkKCoreDecomposition() override
static vtkKCoreDecomposition * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.