VTK  9.2.6
vtkKCoreDecomposition.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkKCoreDecomposition.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
44 #ifndef vtkKCoreDecomposition_h
45 #define vtkKCoreDecomposition_h
46 
47 #include "vtkGraphAlgorithm.h"
48 #include "vtkInfovisCoreModule.h" // For export macro
49 
50 class vtkIntArray;
51 
52 class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm
53 {
54 public:
55  static vtkKCoreDecomposition* New();
56 
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
65  vtkSetStringMacro(OutputArrayName);
67 
69 
75  vtkSetMacro(UseInDegreeNeighbors, bool);
76  vtkGetMacro(UseInDegreeNeighbors, bool);
77  vtkBooleanMacro(UseInDegreeNeighbors, bool);
79 
81 
87  vtkSetMacro(UseOutDegreeNeighbors, bool);
88  vtkGetMacro(UseOutDegreeNeighbors, bool);
89  vtkBooleanMacro(UseOutDegreeNeighbors, bool);
91 
93 
98  vtkSetMacro(CheckInputGraph, bool);
99  vtkGetMacro(CheckInputGraph, bool);
100  vtkBooleanMacro(CheckInputGraph, bool);
102 
103 protected:
105  ~vtkKCoreDecomposition() override;
106 
108 
109 private:
110  char* OutputArrayName;
111 
112  bool UseInDegreeNeighbors;
113  bool UseOutDegreeNeighbors;
114  bool CheckInputGraph;
115 
116  // K-core partitioning implementation
117  void Cores(vtkGraph* g, vtkIntArray* KCoreNumbers);
118 
120  void operator=(const vtkKCoreDecomposition&) = delete;
121 };
122 
123 #endif
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:295
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
Compute the k-core decomposition of the input graph.