VTK  9.3.0
vtkRandomGraphSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
31 #ifndef vtkRandomGraphSource_h
32 #define vtkRandomGraphSource_h
33 
34 #include "vtkGraphAlgorithm.h"
35 #include "vtkInfovisCoreModule.h" // For export macro
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkGraph;
39 class vtkPVXMLElement;
40 
41 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
42 {
43 public:
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:
183  bool Directed;
190  int Seed;
194 
196 
201  vtkInformationVector* outputVector) override;
202 
203 private:
205  void operator=(const vtkRandomGraphSource&) = delete;
206 };
207 
208 VTK_ABI_NAMESPACE_END
209 #endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
a graph with random edges
static vtkRandomGraphSource * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkRandomGraphSource() override
int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Creates directed or undirected output based on Directed flag.
#define VTK_INT_MAX
Definition: vtkType.h:144