VTK
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 -------------------------------------------------------------------------*/
41 #ifndef vtkKCoreDecomposition_h
42 #define vtkKCoreDecomposition_h
43 
44 #include "vtkInfovisCoreModule.h" // For export macro
45 #include "vtkGraphAlgorithm.h"
46 
47 class vtkIntArray;
48 
49 class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm
50 {
51 public:
52  static vtkKCoreDecomposition *New();
53 
55  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
56 
58 
62  vtkSetStringMacro(OutputArrayName);
64 
66 
72  vtkSetMacro(UseInDegreeNeighbors, bool);
73  vtkGetMacro(UseInDegreeNeighbors, bool);
74  vtkBooleanMacro(UseInDegreeNeighbors, bool);
76 
78 
84  vtkSetMacro(UseOutDegreeNeighbors, bool);
85  vtkGetMacro(UseOutDegreeNeighbors, bool);
86  vtkBooleanMacro(UseOutDegreeNeighbors, bool);
88 
90 
95  vtkSetMacro(CheckInputGraph, bool);
96  vtkGetMacro(CheckInputGraph, bool);
97  vtkBooleanMacro(CheckInputGraph, bool);
99 
100 protected:
102  ~vtkKCoreDecomposition() VTK_OVERRIDE;
103 
104  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
105 
106 private:
107 
108  char* OutputArrayName;
109 
110  bool UseInDegreeNeighbors;
111  bool UseOutDegreeNeighbors;
112  bool CheckInputGraph;
113 
114  // K-core partitioning implementation
115  void Cores(vtkGraph* g,
116  vtkIntArray* KCoreNumbers);
117 
118  vtkKCoreDecomposition(const vtkKCoreDecomposition&) VTK_DELETE_FUNCTION;
119  void operator=(const vtkKCoreDecomposition&) VTK_DELETE_FUNCTION;
120 };
121 
122 #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:281
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
a simple class to control print indentation
Definition: vtkIndent.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Compute the k-core decomposition of the input graph.