VTK  9.1.0
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 "vtkGraphAlgorithm.h"
45#include "vtkInfovisCoreModule.h" // For export macro
46
47class vtkIntArray;
48
49class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm
50{
51public:
53
55 void PrintSelf(ostream& os, vtkIndent indent) 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
100protected:
103
105
106private:
107 char* OutputArrayName;
108
109 bool UseInDegreeNeighbors;
110 bool UseOutDegreeNeighbors;
111 bool CheckInputGraph;
112
113 // K-core partitioning implementation
114 void Cores(vtkGraph* g, vtkIntArray* KCoreNumbers);
115
117 void operator=(const vtkKCoreDecomposition&) = delete;
118};
119
120#endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:339
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
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.
static vtkKCoreDecomposition * New()
~vtkKCoreDecomposition() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.