00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00034 #ifndef __vtkRandomGraphSource_h
00035 #define __vtkRandomGraphSource_h
00036
00037 #include "vtkGraphAlgorithm.h"
00038
00039 class vtkGraph;
00040 class vtkPVXMLElement;
00041
00042 class VTK_INFOVIS_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
00043 {
00044 public:
00045 static vtkRandomGraphSource* New();
00046 vtkTypeRevisionMacro(vtkRandomGraphSource,vtkGraphAlgorithm);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050
00051 vtkGetMacro(NumberOfVertices, int);
00052 vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
00054
00056
00058 vtkGetMacro(NumberOfEdges, int);
00059 vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
00061
00063
00065 vtkGetMacro(EdgeProbability, double);
00066 vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
00068
00070
00072 vtkSetMacro(IncludeEdgeWeights, bool);
00073 vtkGetMacro(IncludeEdgeWeights, bool);
00074 vtkBooleanMacro(IncludeEdgeWeights, bool);
00076
00078
00079 vtkSetStringMacro(EdgeWeightArrayName);
00080 vtkGetStringMacro(EdgeWeightArrayName);
00082
00084
00086 vtkSetMacro(Directed, bool);
00087 vtkGetMacro(Directed, bool);
00088 vtkBooleanMacro(Directed, bool);
00090
00092
00094 vtkSetMacro(UseEdgeProbability, bool);
00095 vtkGetMacro(UseEdgeProbability, bool);
00096 vtkBooleanMacro(UseEdgeProbability, bool);
00098
00100
00102 vtkSetMacro(StartWithTree, bool);
00103 vtkGetMacro(StartWithTree, bool);
00104 vtkBooleanMacro(StartWithTree, bool);
00106
00108
00110 vtkSetMacro(AllowSelfLoops, bool);
00111 vtkGetMacro(AllowSelfLoops, bool);
00112 vtkBooleanMacro(AllowSelfLoops, bool);
00114
00116
00118 vtkSetMacro(AllowParallelEdges, bool);
00119 vtkGetMacro(AllowParallelEdges, bool);
00120 vtkBooleanMacro(AllowParallelEdges, bool);
00122
00124
00125 vtkSetMacro(GeneratePedigreeIds, bool);
00126 vtkGetMacro(GeneratePedigreeIds, bool);
00127 vtkBooleanMacro(GeneratePedigreeIds, bool);
00129
00131
00132 vtkSetStringMacro(VertexPedigreeIdArrayName);
00133 vtkGetStringMacro(VertexPedigreeIdArrayName);
00135
00137
00138 vtkSetStringMacro(EdgePedigreeIdArrayName);
00139 vtkGetStringMacro(EdgePedigreeIdArrayName);
00141
00143
00145 vtkSetMacro(Seed, int);
00146 vtkGetMacro(Seed, int);
00148
00149 protected:
00150 vtkRandomGraphSource();
00151 ~vtkRandomGraphSource();
00152 int NumberOfVertices;
00153 int NumberOfEdges;
00154 double EdgeProbability;
00155 bool Directed;
00156 bool UseEdgeProbability;
00157 bool StartWithTree;
00158 bool IncludeEdgeWeights;
00159 bool AllowSelfLoops;
00160 bool AllowParallelEdges;
00161 bool GeneratePedigreeIds;
00162 int Seed;
00163 char* EdgeWeightArrayName;
00164 char* VertexPedigreeIdArrayName;
00165 char* EdgePedigreeIdArrayName;
00166
00167 virtual int RequestData(
00168 vtkInformation*,
00169 vtkInformationVector**,
00170 vtkInformationVector*);
00171
00173
00174 virtual int RequestDataObject(vtkInformation*,
00175 vtkInformationVector** inputVector,
00176 vtkInformationVector* outputVector);
00178
00179 private:
00180 vtkRandomGraphSource(const vtkRandomGraphSource&);
00181 void operator=(const vtkRandomGraphSource&);
00182 };
00183
00184 #endif
00185