VTK  9.3.20240424
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
41#ifndef vtkRandomGraphSource_h
42#define vtkRandomGraphSource_h
43
44#include "vtkGraphAlgorithm.h"
45#include "vtkInfovisCoreModule.h" // For export macro
46
47VTK_ABI_NAMESPACE_BEGIN
48class vtkGraph;
49class vtkPVXMLElement;
50
51class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
62 vtkGetMacro(NumberOfVertices, int);
63 vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
65
67
71 vtkGetMacro(NumberOfEdges, int);
72 vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
74
76
80 vtkGetMacro(EdgeProbability, double);
81 vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
83
85
89 vtkSetMacro(IncludeEdgeWeights, bool);
90 vtkGetMacro(IncludeEdgeWeights, bool);
91 vtkBooleanMacro(IncludeEdgeWeights, bool);
93
95
98 vtkSetStringMacro(EdgeWeightArrayName);
99 vtkGetStringMacro(EdgeWeightArrayName);
101
103
106 vtkSetMacro(Directed, bool);
107 vtkGetMacro(Directed, bool);
108 vtkBooleanMacro(Directed, bool);
110
112
116 vtkSetMacro(UseEdgeProbability, bool);
117 vtkGetMacro(UseEdgeProbability, bool);
118 vtkBooleanMacro(UseEdgeProbability, bool);
120
122
126 vtkSetMacro(StartWithTree, bool);
127 vtkGetMacro(StartWithTree, bool);
128 vtkBooleanMacro(StartWithTree, bool);
130
132
137 vtkSetMacro(AllowSelfLoops, bool);
138 vtkGetMacro(AllowSelfLoops, bool);
139 vtkBooleanMacro(AllowSelfLoops, bool);
141
143
147 vtkSetMacro(AllowParallelEdges, bool);
148 vtkGetMacro(AllowParallelEdges, bool);
149 vtkBooleanMacro(AllowParallelEdges, bool);
151
153
156 vtkSetMacro(GeneratePedigreeIds, bool);
157 vtkGetMacro(GeneratePedigreeIds, bool);
158 vtkBooleanMacro(GeneratePedigreeIds, bool);
160
162
165 vtkSetStringMacro(VertexPedigreeIdArrayName);
166 vtkGetStringMacro(VertexPedigreeIdArrayName);
168
170
173 vtkSetStringMacro(EdgePedigreeIdArrayName);
174 vtkGetStringMacro(EdgePedigreeIdArrayName);
176
178
183 vtkSetMacro(Seed, int);
184 vtkGetMacro(Seed, int);
186
187protected:
200 int Seed;
204
206
211 vtkInformationVector* outputVector) override;
212
213private:
215 void operator=(const vtkRandomGraphSource&) = delete;
216};
217
218VTK_ABI_NAMESPACE_END
219#endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition vtkGraph.h:340
a simple class to control print indentation
Definition vtkIndent.h:108
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