VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkRandomGraphSource.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 -------------------------------------------------------------------------*/ 00037 #ifndef __vtkRandomGraphSource_h 00038 #define __vtkRandomGraphSource_h 00039 00040 #include "vtkInfovisCoreModule.h" // For export macro 00041 #include "vtkGraphAlgorithm.h" 00042 00043 class vtkGraph; 00044 class vtkPVXMLElement; 00045 00046 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm 00047 { 00048 public: 00049 static vtkRandomGraphSource* New(); 00050 vtkTypeMacro(vtkRandomGraphSource,vtkGraphAlgorithm); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 vtkGetMacro(NumberOfVertices, int); 00056 vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX); 00058 00060 00062 vtkGetMacro(NumberOfEdges, int); 00063 vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX); 00065 00067 00069 vtkGetMacro(EdgeProbability, double); 00070 vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0); 00072 00074 00076 vtkSetMacro(IncludeEdgeWeights, bool); 00077 vtkGetMacro(IncludeEdgeWeights, bool); 00078 vtkBooleanMacro(IncludeEdgeWeights, bool); 00080 00082 00083 vtkSetStringMacro(EdgeWeightArrayName); 00084 vtkGetStringMacro(EdgeWeightArrayName); 00086 00088 00090 vtkSetMacro(Directed, bool); 00091 vtkGetMacro(Directed, bool); 00092 vtkBooleanMacro(Directed, bool); 00094 00096 00098 vtkSetMacro(UseEdgeProbability, bool); 00099 vtkGetMacro(UseEdgeProbability, bool); 00100 vtkBooleanMacro(UseEdgeProbability, bool); 00102 00104 00106 vtkSetMacro(StartWithTree, bool); 00107 vtkGetMacro(StartWithTree, bool); 00108 vtkBooleanMacro(StartWithTree, bool); 00110 00112 00114 vtkSetMacro(AllowSelfLoops, bool); 00115 vtkGetMacro(AllowSelfLoops, bool); 00116 vtkBooleanMacro(AllowSelfLoops, bool); 00118 00120 00122 vtkSetMacro(AllowParallelEdges, bool); 00123 vtkGetMacro(AllowParallelEdges, bool); 00124 vtkBooleanMacro(AllowParallelEdges, bool); 00126 00128 00129 vtkSetMacro(GeneratePedigreeIds, bool); 00130 vtkGetMacro(GeneratePedigreeIds, bool); 00131 vtkBooleanMacro(GeneratePedigreeIds, bool); 00133 00135 00136 vtkSetStringMacro(VertexPedigreeIdArrayName); 00137 vtkGetStringMacro(VertexPedigreeIdArrayName); 00139 00141 00142 vtkSetStringMacro(EdgePedigreeIdArrayName); 00143 vtkGetStringMacro(EdgePedigreeIdArrayName); 00145 00147 00149 vtkSetMacro(Seed, int); 00150 vtkGetMacro(Seed, int); 00152 00153 protected: 00154 vtkRandomGraphSource(); 00155 ~vtkRandomGraphSource(); 00156 int NumberOfVertices; 00157 int NumberOfEdges; 00158 double EdgeProbability; 00159 bool Directed; 00160 bool UseEdgeProbability; 00161 bool StartWithTree; 00162 bool IncludeEdgeWeights; 00163 bool AllowSelfLoops; 00164 bool AllowParallelEdges; 00165 bool GeneratePedigreeIds; 00166 int Seed; 00167 char* EdgeWeightArrayName; 00168 char* VertexPedigreeIdArrayName; 00169 char* EdgePedigreeIdArrayName; 00170 00171 virtual int RequestData( 00172 vtkInformation*, 00173 vtkInformationVector**, 00174 vtkInformationVector*); 00175 00177 00178 virtual int RequestDataObject(vtkInformation*, 00179 vtkInformationVector** inputVector, 00180 vtkInformationVector* outputVector); 00182 00183 private: 00184 vtkRandomGraphSource(const vtkRandomGraphSource&); // Not implemented 00185 void operator=(const vtkRandomGraphSource&); // Not implemented 00186 }; 00187 00188 #endif 00189