VTK
vtkRandomGraphSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRandomGraphSource.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 -------------------------------------------------------------------------*/
38 #ifndef vtkRandomGraphSource_h
39 #define vtkRandomGraphSource_h
40 
41 #include "vtkInfovisCoreModule.h" // For export macro
42 #include "vtkGraphAlgorithm.h"
43 
44 class vtkGraph;
45 class vtkPVXMLElement;
46 
47 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
58  vtkGetMacro(NumberOfVertices, int);
59  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
61 
63 
67  vtkGetMacro(NumberOfEdges, int);
68  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
70 
72 
76  vtkGetMacro(EdgeProbability, double);
77  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
79 
81 
85  vtkSetMacro(IncludeEdgeWeights, bool);
86  vtkGetMacro(IncludeEdgeWeights, bool);
87  vtkBooleanMacro(IncludeEdgeWeights, bool);
89 
91 
94  vtkSetStringMacro(EdgeWeightArrayName);
95  vtkGetStringMacro(EdgeWeightArrayName);
97 
99 
102  vtkSetMacro(Directed, bool);
103  vtkGetMacro(Directed, bool);
104  vtkBooleanMacro(Directed, bool);
106 
108 
112  vtkSetMacro(UseEdgeProbability, bool);
113  vtkGetMacro(UseEdgeProbability, bool);
114  vtkBooleanMacro(UseEdgeProbability, bool);
116 
118 
122  vtkSetMacro(StartWithTree, bool);
123  vtkGetMacro(StartWithTree, bool);
124  vtkBooleanMacro(StartWithTree, bool);
126 
128 
133  vtkSetMacro(AllowSelfLoops, bool);
134  vtkGetMacro(AllowSelfLoops, bool);
135  vtkBooleanMacro(AllowSelfLoops, bool);
137 
139 
143  vtkSetMacro(AllowParallelEdges, bool);
144  vtkGetMacro(AllowParallelEdges, bool);
145  vtkBooleanMacro(AllowParallelEdges, bool);
147 
149 
152  vtkSetMacro(GeneratePedigreeIds, bool);
153  vtkGetMacro(GeneratePedigreeIds, bool);
154  vtkBooleanMacro(GeneratePedigreeIds, bool);
156 
158 
161  vtkSetStringMacro(VertexPedigreeIdArrayName);
162  vtkGetStringMacro(VertexPedigreeIdArrayName);
164 
166 
169  vtkSetStringMacro(EdgePedigreeIdArrayName);
170  vtkGetStringMacro(EdgePedigreeIdArrayName);
172 
174 
179  vtkSetMacro(Seed, int);
180  vtkGetMacro(Seed, int);
182 
183 protected:
189  bool Directed;
196  int Seed;
200 
201  virtual int RequestData(
205 
210  vtkInformationVector** inputVector,
211  vtkInformationVector* outputVector);
212 
213 private:
214  vtkRandomGraphSource(const vtkRandomGraphSource&) VTK_DELETE_FUNCTION;
215  void operator=(const vtkRandomGraphSource&) VTK_DELETE_FUNCTION;
216 };
217 
218 #endif
219 
vtkRandomGraphSource::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:55
vtkRandomGraphSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkRandomGraphSource::VertexPedigreeIdArrayName
char * VertexPedigreeIdArrayName
Definition: vtkRandomGraphSource.h:198
vtkRandomGraphSource::UseEdgeProbability
bool UseEdgeProbability
Definition: vtkRandomGraphSource.h:190
vtkRandomGraphSource::~vtkRandomGraphSource
~vtkRandomGraphSource()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkRandomGraphSource::NumberOfVertices
int NumberOfVertices
Definition: vtkRandomGraphSource.h:186
vtkRandomGraphSource::IncludeEdgeWeights
bool IncludeEdgeWeights
Definition: vtkRandomGraphSource.h:192
vtkRandomGraphSource::GeneratePedigreeIds
bool GeneratePedigreeIds
Definition: vtkRandomGraphSource.h:195
vtkRandomGraphSource::EdgeProbability
double EdgeProbability
Definition: vtkRandomGraphSource.h:188
vtkRandomGraphSource::AllowSelfLoops
bool AllowSelfLoops
Definition: vtkRandomGraphSource.h:193
vtkRandomGraphSource::NumberOfEdges
int NumberOfEdges
Definition: vtkRandomGraphSource.h:187
vtkGraphAlgorithm.h
vtkRandomGraphSource::AllowParallelEdges
bool AllowParallelEdges
Definition: vtkRandomGraphSource.h:194
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkRandomGraphSource::EdgePedigreeIdArrayName
char * EdgePedigreeIdArrayName
Definition: vtkRandomGraphSource.h:199
vtkRandomGraphSource
a graph with random edges
Definition: vtkRandomGraphSource.h:48
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkRandomGraphSource::Directed
bool Directed
Definition: vtkRandomGraphSource.h:189
vtkRandomGraphSource::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Creates directed or undirected output based on Directed flag.
vtkRandomGraphSource::StartWithTree
bool StartWithTree
Definition: vtkRandomGraphSource.h:191
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkRandomGraphSource::vtkRandomGraphSource
vtkRandomGraphSource()
vtkRandomGraphSource::New
static vtkRandomGraphSource * New()
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:288
vtkRandomGraphSource::Seed
int Seed
Definition: vtkRandomGraphSource.h:196
vtkRandomGraphSource::EdgeWeightArrayName
char * EdgeWeightArrayName
Definition: vtkRandomGraphSource.h:197