VTK  9.1.0
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-------------------------------------------------------------------------*/
61#ifndef vtkRandomGraphSource_h
62#define vtkRandomGraphSource_h
63
64#include "vtkGraphAlgorithm.h"
65#include "vtkInfovisCoreModule.h" // For export macro
66
67class vtkGraph;
68class vtkPVXMLElement;
69
70class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
71{
72public:
75 void PrintSelf(ostream& os, vtkIndent indent) override;
76
78
81 vtkGetMacro(NumberOfVertices, int);
82 vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
84
86
90 vtkGetMacro(NumberOfEdges, int);
91 vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
93
95
99 vtkGetMacro(EdgeProbability, double);
100 vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
102
104
108 vtkSetMacro(IncludeEdgeWeights, bool);
109 vtkGetMacro(IncludeEdgeWeights, bool);
110 vtkBooleanMacro(IncludeEdgeWeights, bool);
112
114
117 vtkSetStringMacro(EdgeWeightArrayName);
118 vtkGetStringMacro(EdgeWeightArrayName);
120
122
125 vtkSetMacro(Directed, bool);
126 vtkGetMacro(Directed, bool);
127 vtkBooleanMacro(Directed, bool);
129
131
135 vtkSetMacro(UseEdgeProbability, bool);
136 vtkGetMacro(UseEdgeProbability, bool);
137 vtkBooleanMacro(UseEdgeProbability, bool);
139
141
145 vtkSetMacro(StartWithTree, bool);
146 vtkGetMacro(StartWithTree, bool);
147 vtkBooleanMacro(StartWithTree, bool);
149
151
156 vtkSetMacro(AllowSelfLoops, bool);
157 vtkGetMacro(AllowSelfLoops, bool);
158 vtkBooleanMacro(AllowSelfLoops, bool);
160
162
166 vtkSetMacro(AllowParallelEdges, bool);
167 vtkGetMacro(AllowParallelEdges, bool);
168 vtkBooleanMacro(AllowParallelEdges, bool);
170
172
175 vtkSetMacro(GeneratePedigreeIds, bool);
176 vtkGetMacro(GeneratePedigreeIds, bool);
177 vtkBooleanMacro(GeneratePedigreeIds, bool);
179
181
184 vtkSetStringMacro(VertexPedigreeIdArrayName);
185 vtkGetStringMacro(VertexPedigreeIdArrayName);
187
189
192 vtkSetStringMacro(EdgePedigreeIdArrayName);
193 vtkGetStringMacro(EdgePedigreeIdArrayName);
195
197
202 vtkSetMacro(Seed, int);
203 vtkGetMacro(Seed, int);
205
206protected:
219 int Seed;
223
225
230 vtkInformationVector* outputVector) override;
231
232private:
234 void operator=(const vtkRandomGraphSource&) = delete;
235};
236
237#endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:339
a simple class to control print indentation
Definition: vtkIndent.h:113
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:155