VTK  9.2.5
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 -------------------------------------------------------------------------*/
67 #ifndef vtkRandomGraphSource_h
68 #define vtkRandomGraphSource_h
69 
70 #include "vtkGraphAlgorithm.h"
71 #include "vtkInfovisCoreModule.h" // For export macro
72 
73 class vtkGraph;
74 class vtkPVXMLElement;
75 
76 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
77 {
78 public:
81  void PrintSelf(ostream& os, vtkIndent indent) override;
82 
84 
87  vtkGetMacro(NumberOfVertices, int);
88  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
90 
92 
96  vtkGetMacro(NumberOfEdges, int);
97  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
99 
101 
105  vtkGetMacro(EdgeProbability, double);
106  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
108 
110 
114  vtkSetMacro(IncludeEdgeWeights, bool);
115  vtkGetMacro(IncludeEdgeWeights, bool);
116  vtkBooleanMacro(IncludeEdgeWeights, bool);
118 
120 
123  vtkSetStringMacro(EdgeWeightArrayName);
124  vtkGetStringMacro(EdgeWeightArrayName);
126 
128 
131  vtkSetMacro(Directed, bool);
132  vtkGetMacro(Directed, bool);
133  vtkBooleanMacro(Directed, bool);
135 
137 
141  vtkSetMacro(UseEdgeProbability, bool);
142  vtkGetMacro(UseEdgeProbability, bool);
143  vtkBooleanMacro(UseEdgeProbability, bool);
145 
147 
151  vtkSetMacro(StartWithTree, bool);
152  vtkGetMacro(StartWithTree, bool);
153  vtkBooleanMacro(StartWithTree, bool);
155 
157 
162  vtkSetMacro(AllowSelfLoops, bool);
163  vtkGetMacro(AllowSelfLoops, bool);
164  vtkBooleanMacro(AllowSelfLoops, bool);
166 
168 
172  vtkSetMacro(AllowParallelEdges, bool);
173  vtkGetMacro(AllowParallelEdges, bool);
174  vtkBooleanMacro(AllowParallelEdges, bool);
176 
178 
181  vtkSetMacro(GeneratePedigreeIds, bool);
182  vtkGetMacro(GeneratePedigreeIds, bool);
183  vtkBooleanMacro(GeneratePedigreeIds, bool);
185 
187 
190  vtkSetStringMacro(VertexPedigreeIdArrayName);
191  vtkGetStringMacro(VertexPedigreeIdArrayName);
193 
195 
198  vtkSetStringMacro(EdgePedigreeIdArrayName);
199  vtkGetStringMacro(EdgePedigreeIdArrayName);
201 
203 
208  vtkSetMacro(Seed, int);
209  vtkGetMacro(Seed, int);
211 
212 protected:
218  bool Directed;
225  int Seed;
229 
231 
236  vtkInformationVector* outputVector) override;
237 
238 private:
240  void operator=(const vtkRandomGraphSource&) = delete;
241 };
242 
243 #endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:345
a simple class to control print indentation
Definition: vtkIndent.h:119
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