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 "vtkGraphAlgorithm.h" 00050 00051 class vtkIntArray; 00052 00053 class VTK_INFOVIS_EXPORT vtkKCoreDecomposition : public vtkGraphAlgorithm 00054 { 00055 public: 00056 static vtkKCoreDecomposition *New(); 00057 00058 vtkTypeMacro(vtkKCoreDecomposition, vtkGraphAlgorithm); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00060 00062 00064 vtkSetStringMacro(OutputArrayName); 00066 00068 00071 vtkSetMacro(UseInDegreeNeighbors, bool); 00072 vtkGetMacro(UseInDegreeNeighbors, bool); 00073 vtkBooleanMacro(UseInDegreeNeighbors, bool); 00075 00077 00080 vtkSetMacro(UseOutDegreeNeighbors, bool); 00081 vtkGetMacro(UseOutDegreeNeighbors, bool); 00082 vtkBooleanMacro(UseOutDegreeNeighbors, bool); 00084 00086 00089 vtkSetMacro(CheckInputGraph, bool); 00090 vtkGetMacro(CheckInputGraph, bool); 00091 vtkBooleanMacro(CheckInputGraph, bool); 00093 00094 protected: 00095 vtkKCoreDecomposition(); 00096 ~vtkKCoreDecomposition(); 00097 00098 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00099 00100 private: 00101 00102 char* OutputArrayName; 00103 00104 bool UseInDegreeNeighbors; 00105 bool UseOutDegreeNeighbors; 00106 bool CheckInputGraph; 00107 00108 // K-core partitioning implementation 00109 void Cores(vtkGraph* g, 00110 vtkIntArray* KCoreNumbers); 00111 00112 vtkKCoreDecomposition(const vtkKCoreDecomposition&); // Not implemented. 00113 void operator=(const vtkKCoreDecomposition&); // Not implemented. 00114 }; 00115 00116 #endif