VTK  9.2.6
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 -------------------------------------------------------------------------*/
47 #ifndef vtkRandomGraphSource_h
48 #define vtkRandomGraphSource_h
49 
50 #include "vtkGraphAlgorithm.h"
51 #include "vtkInfovisCoreModule.h" // For export macro
52 
53 class vtkGraph;
54 class vtkPVXMLElement;
55 
56 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
67  vtkGetMacro(NumberOfVertices, int);
68  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
70 
72 
76  vtkGetMacro(NumberOfEdges, int);
77  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
79 
81 
85  vtkGetMacro(EdgeProbability, double);
86  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
88 
90 
94  vtkSetMacro(IncludeEdgeWeights, bool);
95  vtkGetMacro(IncludeEdgeWeights, bool);
96  vtkBooleanMacro(IncludeEdgeWeights, bool);
98 
100 
103  vtkSetStringMacro(EdgeWeightArrayName);
104  vtkGetStringMacro(EdgeWeightArrayName);
106 
108 
111  vtkSetMacro(Directed, bool);
112  vtkGetMacro(Directed, bool);
113  vtkBooleanMacro(Directed, bool);
115 
117 
121  vtkSetMacro(UseEdgeProbability, bool);
122  vtkGetMacro(UseEdgeProbability, bool);
123  vtkBooleanMacro(UseEdgeProbability, bool);
125 
127 
131  vtkSetMacro(StartWithTree, bool);
132  vtkGetMacro(StartWithTree, bool);
133  vtkBooleanMacro(StartWithTree, bool);
135 
137 
142  vtkSetMacro(AllowSelfLoops, bool);
143  vtkGetMacro(AllowSelfLoops, bool);
144  vtkBooleanMacro(AllowSelfLoops, bool);
146 
148 
152  vtkSetMacro(AllowParallelEdges, bool);
153  vtkGetMacro(AllowParallelEdges, bool);
154  vtkBooleanMacro(AllowParallelEdges, bool);
156 
158 
161  vtkSetMacro(GeneratePedigreeIds, bool);
162  vtkGetMacro(GeneratePedigreeIds, bool);
163  vtkBooleanMacro(GeneratePedigreeIds, bool);
165 
167 
170  vtkSetStringMacro(VertexPedigreeIdArrayName);
171  vtkGetStringMacro(VertexPedigreeIdArrayName);
173 
175 
178  vtkSetStringMacro(EdgePedigreeIdArrayName);
179  vtkGetStringMacro(EdgePedigreeIdArrayName);
181 
183 
188  vtkSetMacro(Seed, int);
189  vtkGetMacro(Seed, int);
191 
192 protected:
198  bool Directed;
205  int Seed;
209 
211 
216  vtkInformationVector* outputVector) override;
217 
218 private:
220  void operator=(const vtkRandomGraphSource&) = delete;
221 };
222 
223 #endif
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:305
a simple class to control print indentation
Definition: vtkIndent.h:49
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