VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkKCoreDecomposition.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00046 #ifndef __vtkKCoreDecomposition_h 00047 #define __vtkKCoreDecomposition_h 00048 00049 #include "vtkInfovisCoreModule.h" // For export macro 00050 #include "vtkGraphAlgorithm.h" 00051 00052 class vtkIntArray; 00053 00054 class VTKINFOVISCORE_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm 00055 { 00056 public: 00057 static vtkKCoreDecomposition *New(); 00058 00059 vtkTypeMacro(vtkKCoreDecomposition, vtkGraphAlgorithm); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00061 00063 00065 vtkSetStringMacro(OutputArrayName); 00067 00069 00072 vtkSetMacro(UseInDegreeNeighbors, bool); 00073 vtkGetMacro(UseInDegreeNeighbors, bool); 00074 vtkBooleanMacro(UseInDegreeNeighbors, bool); 00076 00078 00081 vtkSetMacro(UseOutDegreeNeighbors, bool); 00082 vtkGetMacro(UseOutDegreeNeighbors, bool); 00083 vtkBooleanMacro(UseOutDegreeNeighbors, bool); 00085 00087 00090 vtkSetMacro(CheckInputGraph, bool); 00091 vtkGetMacro(CheckInputGraph, bool); 00092 vtkBooleanMacro(CheckInputGraph, bool); 00094 00095 protected: 00096 vtkKCoreDecomposition(); 00097 ~vtkKCoreDecomposition(); 00098 00099 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00100 00101 private: 00102 00103 char* OutputArrayName; 00104 00105 bool UseInDegreeNeighbors; 00106 bool UseOutDegreeNeighbors; 00107 bool CheckInputGraph; 00108 00109 // K-core partitioning implementation 00110 void Cores(vtkGraph* g, 00111 vtkIntArray* KCoreNumbers); 00112 00113 vtkKCoreDecomposition(const vtkKCoreDecomposition&); // Not implemented. 00114 void operator=(const vtkKCoreDecomposition&); // Not implemented. 00115 }; 00116 00117 #endif