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 -------------------------------------------------------------------------*/
46 #ifndef __vtkKCoreDecomposition_h
47 #define __vtkKCoreDecomposition_h
48 
49 #include "vtkGraphAlgorithm.h"
50 
51 class vtkIntArray;
52 
54 {
55 public:
56  static vtkKCoreDecomposition *New();
57 
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
64  vtkSetStringMacro(OutputArrayName);
66 
68 
71  vtkSetMacro(UseInDegreeNeighbors, bool);
72  vtkGetMacro(UseInDegreeNeighbors, bool);
73  vtkBooleanMacro(UseInDegreeNeighbors, bool);
75 
77 
80  vtkSetMacro(UseOutDegreeNeighbors, bool);
81  vtkGetMacro(UseOutDegreeNeighbors, bool);
82  vtkBooleanMacro(UseOutDegreeNeighbors, bool);
84 
86 
89  vtkSetMacro(CheckInputGraph, bool);
90  vtkGetMacro(CheckInputGraph, bool);
91  vtkBooleanMacro(CheckInputGraph, bool);
93 
94 protected:
97 
99 
100 private:
101 
102  char* OutputArrayName;
103 
104  bool UseInDegreeNeighbors;
105  bool UseOutDegreeNeighbors;
106  bool CheckInputGraph;
107 
108  // K-core partitioning implementation
109  void Cores(vtkGraph* g,
110  vtkIntArray* KCoreNumbers);
111 
112  vtkKCoreDecomposition(const vtkKCoreDecomposition&); // Not implemented.
113  void operator=(const vtkKCoreDecomposition&); // Not implemented.
114 };
115 
116 #endif