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
22 #ifndef vtkRandomGraphSource_h
23 #define vtkRandomGraphSource_h
24 
25 #include "vtkGraphAlgorithm.h"
26 #include "vtkInfovisCoreModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkGraph;
30 class vtkPVXMLElement;
31 
32 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
43  vtkGetMacro(NumberOfVertices, int);
44  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
46 
48 
52  vtkGetMacro(NumberOfEdges, int);
53  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
55 
57 
61  vtkGetMacro(EdgeProbability, double);
62  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
64 
66 
70  vtkSetMacro(IncludeEdgeWeights, bool);
71  vtkGetMacro(IncludeEdgeWeights, bool);
72  vtkBooleanMacro(IncludeEdgeWeights, bool);
74 
76 
79  vtkSetStringMacro(EdgeWeightArrayName);
80  vtkGetStringMacro(EdgeWeightArrayName);
82 
84 
87  vtkSetMacro(Directed, bool);
88  vtkGetMacro(Directed, bool);
89  vtkBooleanMacro(Directed, bool);
91 
93 
97  vtkSetMacro(UseEdgeProbability, bool);
98  vtkGetMacro(UseEdgeProbability, bool);
99  vtkBooleanMacro(UseEdgeProbability, bool);
101 
103 
107  vtkSetMacro(StartWithTree, bool);
108  vtkGetMacro(StartWithTree, bool);
109  vtkBooleanMacro(StartWithTree, bool);
111 
113 
118  vtkSetMacro(AllowSelfLoops, bool);
119  vtkGetMacro(AllowSelfLoops, bool);
120  vtkBooleanMacro(AllowSelfLoops, bool);
122 
124 
128  vtkSetMacro(AllowParallelEdges, bool);
129  vtkGetMacro(AllowParallelEdges, bool);
130  vtkBooleanMacro(AllowParallelEdges, bool);
132 
134 
137  vtkSetMacro(GeneratePedigreeIds, bool);
138  vtkGetMacro(GeneratePedigreeIds, bool);
139  vtkBooleanMacro(GeneratePedigreeIds, bool);
141 
143 
146  vtkSetStringMacro(VertexPedigreeIdArrayName);
147  vtkGetStringMacro(VertexPedigreeIdArrayName);
149 
151 
154  vtkSetStringMacro(EdgePedigreeIdArrayName);
155  vtkGetStringMacro(EdgePedigreeIdArrayName);
157 
159 
164  vtkSetMacro(Seed, int);
165  vtkGetMacro(Seed, int);
167 
168 protected:
174  bool Directed;
181  int Seed;
185 
187 
192  vtkInformationVector* outputVector) override;
193 
194 private:
196  void operator=(const vtkRandomGraphSource&) = delete;
197 };
198 
199 VTK_ABI_NAMESPACE_END
200 #endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:29
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