VTK  9.4.20250127
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
61#ifndef vtkRandomGraphSource_h
62#define vtkRandomGraphSource_h
63
64#include "vtkGraphAlgorithm.h"
65#include "vtkInfovisCoreModule.h" // For export macro
66
67VTK_ABI_NAMESPACE_BEGIN
68class vtkGraph;
69class vtkPVXMLElement;
70
71class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
72{
73public:
76 void PrintSelf(ostream& os, vtkIndent indent) override;
77
79
82 vtkGetMacro(NumberOfVertices, int);
83 vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
85
87
91 vtkGetMacro(NumberOfEdges, int);
92 vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
94
96
100 vtkGetMacro(EdgeProbability, double);
101 vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
103
105
109 vtkSetMacro(IncludeEdgeWeights, bool);
110 vtkGetMacro(IncludeEdgeWeights, bool);
111 vtkBooleanMacro(IncludeEdgeWeights, bool);
113
115
118 vtkSetStringMacro(EdgeWeightArrayName);
119 vtkGetStringMacro(EdgeWeightArrayName);
121
123
126 vtkSetMacro(Directed, bool);
127 vtkGetMacro(Directed, bool);
128 vtkBooleanMacro(Directed, bool);
130
132
136 vtkSetMacro(UseEdgeProbability, bool);
137 vtkGetMacro(UseEdgeProbability, bool);
138 vtkBooleanMacro(UseEdgeProbability, bool);
140
142
146 vtkSetMacro(StartWithTree, bool);
147 vtkGetMacro(StartWithTree, bool);
148 vtkBooleanMacro(StartWithTree, bool);
150
152
157 vtkSetMacro(AllowSelfLoops, bool);
158 vtkGetMacro(AllowSelfLoops, bool);
159 vtkBooleanMacro(AllowSelfLoops, bool);
161
163
167 vtkSetMacro(AllowParallelEdges, bool);
168 vtkGetMacro(AllowParallelEdges, bool);
169 vtkBooleanMacro(AllowParallelEdges, bool);
171
173
176 vtkSetMacro(GeneratePedigreeIds, bool);
177 vtkGetMacro(GeneratePedigreeIds, bool);
178 vtkBooleanMacro(GeneratePedigreeIds, bool);
180
182
185 vtkSetStringMacro(VertexPedigreeIdArrayName);
186 vtkGetStringMacro(VertexPedigreeIdArrayName);
188
190
193 vtkSetStringMacro(EdgePedigreeIdArrayName);
194 vtkGetStringMacro(EdgePedigreeIdArrayName);
196
198
203 vtkSetMacro(Seed, int);
204 vtkGetMacro(Seed, int);
206
207protected:
220 int Seed;
224
226
231 vtkInformationVector* outputVector) override;
232
233private:
235 void operator=(const vtkRandomGraphSource&) = delete;
236};
237
238VTK_ABI_NAMESPACE_END
239#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