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 -------------------------------------------------------------------------*/
37 #ifndef __vtkRandomGraphSource_h
38 #define __vtkRandomGraphSource_h
39 
40 #include "vtkGraphAlgorithm.h"
41 
42 class vtkGraph;
43 class vtkPVXMLElement;
44 
46 {
47 public:
48  static vtkRandomGraphSource* New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
54  vtkGetMacro(NumberOfVertices, int);
55  vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
57 
59 
61  vtkGetMacro(NumberOfEdges, int);
62  vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
64 
66 
68  vtkGetMacro(EdgeProbability, double);
69  vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
71 
73 
75  vtkSetMacro(IncludeEdgeWeights, bool);
76  vtkGetMacro(IncludeEdgeWeights, bool);
77  vtkBooleanMacro(IncludeEdgeWeights, bool);
79 
81 
82  vtkSetStringMacro(EdgeWeightArrayName);
83  vtkGetStringMacro(EdgeWeightArrayName);
85 
87 
89  vtkSetMacro(Directed, bool);
90  vtkGetMacro(Directed, bool);
91  vtkBooleanMacro(Directed, bool);
93 
95 
97  vtkSetMacro(UseEdgeProbability, bool);
98  vtkGetMacro(UseEdgeProbability, bool);
99  vtkBooleanMacro(UseEdgeProbability, bool);
101 
103 
105  vtkSetMacro(StartWithTree, bool);
106  vtkGetMacro(StartWithTree, bool);
107  vtkBooleanMacro(StartWithTree, bool);
109 
111 
113  vtkSetMacro(AllowSelfLoops, bool);
114  vtkGetMacro(AllowSelfLoops, bool);
115  vtkBooleanMacro(AllowSelfLoops, bool);
117 
119 
121  vtkSetMacro(AllowParallelEdges, bool);
122  vtkGetMacro(AllowParallelEdges, bool);
123  vtkBooleanMacro(AllowParallelEdges, bool);
125 
127 
128  vtkSetMacro(GeneratePedigreeIds, bool);
129  vtkGetMacro(GeneratePedigreeIds, bool);
130  vtkBooleanMacro(GeneratePedigreeIds, bool);
132 
134 
135  vtkSetStringMacro(VertexPedigreeIdArrayName);
136  vtkGetStringMacro(VertexPedigreeIdArrayName);
138 
140 
141  vtkSetStringMacro(EdgePedigreeIdArrayName);
142  vtkGetStringMacro(EdgePedigreeIdArrayName);
144 
146 
148  vtkSetMacro(Seed, int);
149  vtkGetMacro(Seed, int);
151 
152 protected:
158  bool Directed;
165  int Seed;
169 
170  virtual int RequestData(
171  vtkInformation*,
174 
176 
177  virtual int RequestDataObject(vtkInformation*,
178  vtkInformationVector** inputVector,
179  vtkInformationVector* outputVector);
181 
182 private:
183  vtkRandomGraphSource(const vtkRandomGraphSource&); // Not implemented
184  void operator=(const vtkRandomGraphSource&); // Not implemented
185 };
186 
187 #endif
188