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 -------------------------------------------------------------------------*/
47 #ifndef vtkKCoreDecomposition_h
48 #define vtkKCoreDecomposition_h
49 
50 #include "vtkInfovisCoreModule.h" // For export macro
51 #include "vtkGraphAlgorithm.h"
52 
53 class vtkIntArray;
54 
55 class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm
56 {
57 public:
58  static vtkKCoreDecomposition *New();
59 
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
68  vtkSetStringMacro(OutputArrayName);
70 
72 
78  vtkSetMacro(UseInDegreeNeighbors, bool);
79  vtkGetMacro(UseInDegreeNeighbors, bool);
80  vtkBooleanMacro(UseInDegreeNeighbors, bool);
82 
84 
90  vtkSetMacro(UseOutDegreeNeighbors, bool);
91  vtkGetMacro(UseOutDegreeNeighbors, bool);
92  vtkBooleanMacro(UseOutDegreeNeighbors, bool);
94 
96 
101  vtkSetMacro(CheckInputGraph, bool);
102  vtkGetMacro(CheckInputGraph, bool);
103  vtkBooleanMacro(CheckInputGraph, bool);
105 
106 protected:
108  ~vtkKCoreDecomposition() override;
109 
111 
112 private:
113 
114  char* OutputArrayName;
115 
116  bool UseInDegreeNeighbors;
117  bool UseOutDegreeNeighbors;
118  bool CheckInputGraph;
119 
120  // K-core partitioning implementation
121  void Cores(vtkGraph* g,
122  vtkIntArray* KCoreNumbers);
123 
125  void operator=(const vtkKCoreDecomposition&) = delete;
126 };
127 
128 #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:287
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.