VTK  9.0.20201130
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 -------------------------------------------------------------------------*/
32 #ifndef vtkRandomGraphSource_h
33 #define vtkRandomGraphSource_h
34 
35 #include "vtkGraphAlgorithm.h"
36 #include "vtkInfovisCoreModule.h" // For export macro
37 
38 class vtkGraph;
39 class vtkPVXMLElement;
40 
41 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
42 {
43 public:
44  static vtkRandomGraphSource* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkGetMacro(NumberOfVertices, int);
53  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
55 
57 
61  vtkGetMacro(NumberOfEdges, int);
62  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
64 
66 
70  vtkGetMacro(EdgeProbability, double);
71  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
73 
75 
79  vtkSetMacro(IncludeEdgeWeights, bool);
80  vtkGetMacro(IncludeEdgeWeights, bool);
81  vtkBooleanMacro(IncludeEdgeWeights, bool);
83 
85 
88  vtkSetStringMacro(EdgeWeightArrayName);
89  vtkGetStringMacro(EdgeWeightArrayName);
91 
93 
96  vtkSetMacro(Directed, bool);
97  vtkGetMacro(Directed, bool);
98  vtkBooleanMacro(Directed, bool);
100 
102 
106  vtkSetMacro(UseEdgeProbability, bool);
107  vtkGetMacro(UseEdgeProbability, bool);
108  vtkBooleanMacro(UseEdgeProbability, bool);
110 
112 
116  vtkSetMacro(StartWithTree, bool);
117  vtkGetMacro(StartWithTree, bool);
118  vtkBooleanMacro(StartWithTree, bool);
120 
122 
127  vtkSetMacro(AllowSelfLoops, bool);
128  vtkGetMacro(AllowSelfLoops, bool);
129  vtkBooleanMacro(AllowSelfLoops, bool);
131 
133 
137  vtkSetMacro(AllowParallelEdges, bool);
138  vtkGetMacro(AllowParallelEdges, bool);
139  vtkBooleanMacro(AllowParallelEdges, bool);
141 
143 
146  vtkSetMacro(GeneratePedigreeIds, bool);
147  vtkGetMacro(GeneratePedigreeIds, bool);
148  vtkBooleanMacro(GeneratePedigreeIds, bool);
150 
152 
155  vtkSetStringMacro(VertexPedigreeIdArrayName);
156  vtkGetStringMacro(VertexPedigreeIdArrayName);
158 
160 
163  vtkSetStringMacro(EdgePedigreeIdArrayName);
164  vtkGetStringMacro(EdgePedigreeIdArrayName);
166 
168 
173  vtkSetMacro(Seed, int);
174  vtkGetMacro(Seed, int);
176 
177 protected:
179  ~vtkRandomGraphSource() override;
183  bool Directed;
190  int Seed;
194 
196 
201  vtkInformationVector* outputVector) override;
202 
203 private:
205  void operator=(const vtkRandomGraphSource&) = delete;
206 };
207 
208 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:147
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkRandomGraphSource::VertexPedigreeIdArrayName
char * VertexPedigreeIdArrayName
Definition: vtkRandomGraphSource.h:192
vtkRandomGraphSource::UseEdgeProbability
bool UseEdgeProbability
Definition: vtkRandomGraphSource.h:184
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkRandomGraphSource::NumberOfVertices
int NumberOfVertices
Definition: vtkRandomGraphSource.h:180
vtkRandomGraphSource::IncludeEdgeWeights
bool IncludeEdgeWeights
Definition: vtkRandomGraphSource.h:186
vtkRandomGraphSource::GeneratePedigreeIds
bool GeneratePedigreeIds
Definition: vtkRandomGraphSource.h:189
vtkRandomGraphSource::EdgeProbability
double EdgeProbability
Definition: vtkRandomGraphSource.h:182
vtkRandomGraphSource::AllowSelfLoops
bool AllowSelfLoops
Definition: vtkRandomGraphSource.h:187
vtkRandomGraphSource::NumberOfEdges
int NumberOfEdges
Definition: vtkRandomGraphSource.h:181
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkRandomGraphSource::AllowParallelEdges
bool AllowParallelEdges
Definition: vtkRandomGraphSource.h:188
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkRandomGraphSource::EdgePedigreeIdArrayName
char * EdgePedigreeIdArrayName
Definition: vtkRandomGraphSource.h:193
vtkRandomGraphSource
a graph with random edges
Definition: vtkRandomGraphSource.h:41
vtkRandomGraphSource::Directed
bool Directed
Definition: vtkRandomGraphSource.h:183
vtkRandomGraphSource::StartWithTree
bool StartWithTree
Definition: vtkRandomGraphSource.h:185
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkRandomGraphSource::Seed
int Seed
Definition: vtkRandomGraphSource.h:190
vtkRandomGraphSource::EdgeWeightArrayName
char * EdgeWeightArrayName
Definition: vtkRandomGraphSource.h:191
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()