VTK
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 -------------------------------------------------------------------------*/
32 #ifndef vtkRandomGraphSource_h
33 #define vtkRandomGraphSource_h
34 
35 #include "vtkInfovisCoreModule.h" // For export macro
36 #include "vtkGraphAlgorithm.h"
37 
38 class vtkGraph;
39 class vtkPVXMLElement;
40 
41 class VTKINFOVISCORE_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
42 {
43 public:
44  static vtkRandomGraphSource* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkGetMacro(NumberOfVertices, int);
53  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
55 
57 
61  vtkGetMacro(NumberOfEdges, int);
62  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
64 
66 
70  vtkGetMacro(EdgeProbability, double);
71  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
73 
75 
79  vtkSetMacro(IncludeEdgeWeights, bool);
80  vtkGetMacro(IncludeEdgeWeights, bool);
81  vtkBooleanMacro(IncludeEdgeWeights, bool);
83 
85 
88  vtkSetStringMacro(EdgeWeightArrayName);
89  vtkGetStringMacro(EdgeWeightArrayName);
91 
93 
96  vtkSetMacro(Directed, bool);
97  vtkGetMacro(Directed, bool);
98  vtkBooleanMacro(Directed, bool);
100 
102 
106  vtkSetMacro(UseEdgeProbability, bool);
107  vtkGetMacro(UseEdgeProbability, bool);
108  vtkBooleanMacro(UseEdgeProbability, bool);
110 
112 
116  vtkSetMacro(StartWithTree, bool);
117  vtkGetMacro(StartWithTree, bool);
118  vtkBooleanMacro(StartWithTree, bool);
120 
122 
127  vtkSetMacro(AllowSelfLoops, bool);
128  vtkGetMacro(AllowSelfLoops, bool);
129  vtkBooleanMacro(AllowSelfLoops, bool);
131 
133 
137  vtkSetMacro(AllowParallelEdges, bool);
138  vtkGetMacro(AllowParallelEdges, bool);
139  vtkBooleanMacro(AllowParallelEdges, bool);
141 
143 
146  vtkSetMacro(GeneratePedigreeIds, bool);
147  vtkGetMacro(GeneratePedigreeIds, bool);
148  vtkBooleanMacro(GeneratePedigreeIds, bool);
150 
152 
155  vtkSetStringMacro(VertexPedigreeIdArrayName);
156  vtkGetStringMacro(VertexPedigreeIdArrayName);
158 
160 
163  vtkSetStringMacro(EdgePedigreeIdArrayName);
164  vtkGetStringMacro(EdgePedigreeIdArrayName);
166 
168 
173  vtkSetMacro(Seed, int);
174  vtkGetMacro(Seed, int);
176 
177 protected:
179  ~vtkRandomGraphSource() override;
183  bool Directed;
190  int Seed;
194 
195  int RequestData(
198  vtkInformationVector*) override;
199 
204  vtkInformationVector** inputVector,
205  vtkInformationVector* outputVector) override;
206 
207 private:
209  void operator=(const vtkRandomGraphSource&) = delete;
210 };
211 
212 #endif
213 
static vtkGraphAlgorithm * New()
a graph with random edges
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:157
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:33
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.