VTK
vtkMutableDirectedGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMutableDirectedGraph.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 -------------------------------------------------------------------------*/
40 #ifndef vtkMutableDirectedGraph_h
41 #define vtkMutableDirectedGraph_h
42 
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkDirectedGraph.h"
45 
47 class vtkGraphEdge;
48 class vtkVariant;
49 
51 {
52 public:
53  static vtkMutableDirectedGraph *New();
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
65  virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
66 
73  vtkIdType AddVertex();
74 
88  vtkIdType AddVertex(vtkVariantArray *propertyArr);
89 
100  vtkIdType AddVertex(const vtkVariant& pedigreeId);
101 
102 //BTX
104 
108  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
109 //ETX
111 
112 //BTX
114 
121  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
122  vtkVariantArray *propertyArr);
123 //ETX
125 
126  //BTX
128 
135  vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
136  vtkVariantArray *propertyArr = 0);
138 
140 
147  vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
148  vtkVariantArray *propertyArr = 0);
150 
152 
158  vtkEdgeType AddEdge(const vtkVariant& u,
159  const vtkVariant& v,
160  vtkVariantArray *propertyArr = 0);
161  //ETX
163 
167  void LazyAddVertex();
168 
177  void LazyAddVertex(vtkVariantArray *propertyArr);
178 
184  void LazyAddVertex(const vtkVariant& pedigreeId);
185 
192  void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr = 0);
193 
195 
202  void LazyAddEdge(const vtkVariant& u, vtkIdType v,
203  vtkVariantArray *propertyArr = 0);
205 
207 
213  void LazyAddEdge(vtkIdType u, const vtkVariant& v,
214  vtkVariantArray *propertyArr = 0);
216 
218 
224  void LazyAddEdge(const vtkVariant& u,
225  const vtkVariant& v,
226  vtkVariantArray *propertyArr = 0);
228 
234  vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
235 
237 
243  vtkIdType AddChild(vtkIdType parent,
244  vtkVariantArray *propertyArr);
246  { return this->AddChild(parent, 0); }
248 
252  void RemoveVertex(vtkIdType v);
253 
256  void RemoveEdge(vtkIdType e);
257 
260  void RemoveVertices(vtkIdTypeArray* arr);
261 
263  void RemoveEdges(vtkIdTypeArray* arr);
264 
265 protected:
268 
271 
272 private:
273  vtkMutableDirectedGraph(const vtkMutableDirectedGraph&); // Not implemented.
274  void operator=(const vtkMutableDirectedGraph&); // Not implemented.
275 };
276 
277 #endif
An array holding vtkVariants.
void PrintSelf(ostream &os, vtkIndent indent)
Iterates through all edges in a graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
A directed graph.
a simple class to control print indentation
Definition: vtkIndent.h:38
An editable directed graph.
vtkIdType AddChild(vtkIdType parent)
static vtkDirectedGraph * New()
#define VTKCOMMONDATAMODEL_EXPORT