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) VTK_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() VTK_OVERRIDE;
180  int NumberOfVertices;
181  int NumberOfEdges;
182  double EdgeProbability;
183  bool Directed;
184  bool UseEdgeProbability;
185  bool StartWithTree;
186  bool IncludeEdgeWeights;
187  bool AllowSelfLoops;
188  bool AllowParallelEdges;
189  bool GeneratePedigreeIds;
190  int Seed;
191  char* EdgeWeightArrayName;
192  char* VertexPedigreeIdArrayName;
193  char* EdgePedigreeIdArrayName;
194 
195  int RequestData(
198  vtkInformationVector*) VTK_OVERRIDE;
199 
203  int RequestDataObject(vtkInformation*,
204  vtkInformationVector** inputVector,
205  vtkInformationVector* outputVector) VTK_OVERRIDE;
206 
207 private:
208  vtkRandomGraphSource(const vtkRandomGraphSource&) VTK_DELETE_FUNCTION;
209  void operator=(const vtkRandomGraphSource&) VTK_DELETE_FUNCTION;
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
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.