VTK  9.0.20210926
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 -------------------------------------------------------------------------*/
61 #ifndef vtkRandomGraphSource_h
62 #define vtkRandomGraphSource_h
63 
64 #include "vtkGraphAlgorithm.h"
65 #include "vtkInfovisCoreModule.h" // For export macro
66 
67 class vtkGraph;
68 class vtkPVXMLElement;
69 
70 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
71 {
72 public:
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
81  vtkGetMacro(NumberOfVertices, int);
82  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
84 
86 
90  vtkGetMacro(NumberOfEdges, int);
91  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
93 
95 
99  vtkGetMacro(EdgeProbability, double);
100  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
102 
104 
108  vtkSetMacro(IncludeEdgeWeights, bool);
109  vtkGetMacro(IncludeEdgeWeights, bool);
110  vtkBooleanMacro(IncludeEdgeWeights, bool);
112 
114 
117  vtkSetStringMacro(EdgeWeightArrayName);
118  vtkGetStringMacro(EdgeWeightArrayName);
120 
122 
125  vtkSetMacro(Directed, bool);
126  vtkGetMacro(Directed, bool);
127  vtkBooleanMacro(Directed, bool);
129 
131 
135  vtkSetMacro(UseEdgeProbability, bool);
136  vtkGetMacro(UseEdgeProbability, bool);
137  vtkBooleanMacro(UseEdgeProbability, bool);
139 
141 
145  vtkSetMacro(StartWithTree, bool);
146  vtkGetMacro(StartWithTree, bool);
147  vtkBooleanMacro(StartWithTree, bool);
149 
151 
156  vtkSetMacro(AllowSelfLoops, bool);
157  vtkGetMacro(AllowSelfLoops, bool);
158  vtkBooleanMacro(AllowSelfLoops, bool);
160 
162 
166  vtkSetMacro(AllowParallelEdges, bool);
167  vtkGetMacro(AllowParallelEdges, bool);
168  vtkBooleanMacro(AllowParallelEdges, bool);
170 
172 
175  vtkSetMacro(GeneratePedigreeIds, bool);
176  vtkGetMacro(GeneratePedigreeIds, bool);
177  vtkBooleanMacro(GeneratePedigreeIds, bool);
179 
181 
184  vtkSetStringMacro(VertexPedigreeIdArrayName);
185  vtkGetStringMacro(VertexPedigreeIdArrayName);
187 
189 
192  vtkSetStringMacro(EdgePedigreeIdArrayName);
193  vtkGetStringMacro(EdgePedigreeIdArrayName);
195 
197 
202  vtkSetMacro(Seed, int);
203  vtkGetMacro(Seed, int);
205 
206 protected:
212  bool Directed;
219  int Seed;
223 
225 
230  vtkInformationVector* outputVector) override;
231 
232 private:
234  void operator=(const vtkRandomGraphSource&) = delete;
235 };
236 
237 #endif
vtkRandomGraphSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:91
vtkRandomGraphSource::VertexPedigreeIdArrayName
char * VertexPedigreeIdArrayName
Definition: vtkRandomGraphSource.h:221
vtkRandomGraphSource::UseEdgeProbability
bool UseEdgeProbability
Definition: vtkRandomGraphSource.h:213
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkRandomGraphSource::~vtkRandomGraphSource
~vtkRandomGraphSource() override
vtkRandomGraphSource::NumberOfVertices
int NumberOfVertices
Definition: vtkRandomGraphSource.h:209
vtkRandomGraphSource::IncludeEdgeWeights
bool IncludeEdgeWeights
Definition: vtkRandomGraphSource.h:215
vtkRandomGraphSource::GeneratePedigreeIds
bool GeneratePedigreeIds
Definition: vtkRandomGraphSource.h:218
vtkRandomGraphSource::EdgeProbability
double EdgeProbability
Definition: vtkRandomGraphSource.h:211
vtkRandomGraphSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRandomGraphSource::AllowSelfLoops
bool AllowSelfLoops
Definition: vtkRandomGraphSource.h:216
vtkRandomGraphSource::NumberOfEdges
int NumberOfEdges
Definition: vtkRandomGraphSource.h:210
vtkGraphAlgorithm.h
vtkRandomGraphSource::RequestDataObject
int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Creates directed or undirected output based on Directed flag.
vtkRandomGraphSource::AllowParallelEdges
bool AllowParallelEdges
Definition: vtkRandomGraphSource.h:217
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkRandomGraphSource::EdgePedigreeIdArrayName
char * EdgePedigreeIdArrayName
Definition: vtkRandomGraphSource.h:222
vtkRandomGraphSource
a graph with random edges
Definition: vtkRandomGraphSource.h:71
vtkRandomGraphSource::Directed
bool Directed
Definition: vtkRandomGraphSource.h:212
vtkRandomGraphSource::StartWithTree
bool StartWithTree
Definition: vtkRandomGraphSource.h:214
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkRandomGraphSource::vtkRandomGraphSource
vtkRandomGraphSource()
vtkRandomGraphSource::New
static vtkRandomGraphSource * New()
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:339
vtkRandomGraphSource::Seed
int Seed
Definition: vtkRandomGraphSource.h:219
vtkRandomGraphSource::EdgeWeightArrayName
char * EdgeWeightArrayName
Definition: vtkRandomGraphSource.h:220