VTK
vtkMutableUndirectedGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMutableUndirectedGraph.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 -------------------------------------------------------------------------*/
36 #ifndef vtkMutableUndirectedGraph_h
37 #define vtkMutableUndirectedGraph_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkUndirectedGraph.h"
41 
43 class vtkGraphEdge;
44 
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
61  virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
62 
69  vtkIdType AddVertex();
70 
84  vtkIdType AddVertex(vtkVariantArray *propertyArr);
85 
96  vtkIdType AddVertex(const vtkVariant& pedigreeId);
97 
98  //BTX
103  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
104 
106 
113  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
114  vtkVariantArray *propertyArr);
116 
118 
125  vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
126  vtkVariantArray *propertyArr = 0);
128 
130 
137  vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
138  vtkVariantArray *propertyArr = 0);
140 
142 
148  vtkEdgeType AddEdge(const vtkVariant& u,
149  const vtkVariant& v,
150  vtkVariantArray *propertyArr = 0);
152 
153  //ETX
154 
158  void LazyAddVertex();
159 
168  void LazyAddVertex(vtkVariantArray *propertyArr);
169 
175  void LazyAddVertex(const vtkVariant& pedigreeId);
176 
181  void LazyAddEdge(vtkIdType u, vtkIdType v);
182 
189  void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr);
190 
192 
199  void LazyAddEdge(const vtkVariant& u, vtkIdType v,
200  vtkVariantArray *propertyArr = 0);
202 
204 
211  void LazyAddEdge(vtkIdType u, const vtkVariant& v,
212  vtkVariantArray *propertyArr = 0);
214 
216 
222  void LazyAddEdge(const vtkVariant& u,
223  const vtkVariant& v,
224  vtkVariantArray *propertyArr = 0);
226 
232  vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
233 
237  void RemoveVertex(vtkIdType v);
238 
241  void RemoveEdge(vtkIdType e);
242 
245  void RemoveVertices(vtkIdTypeArray* arr);
246 
248  void RemoveEdges(vtkIdTypeArray* arr);
249 
250 protected:
253 
256 
257 private:
258  vtkMutableUndirectedGraph(const vtkMutableUndirectedGraph&); // Not implemented.
259  void operator=(const vtkMutableUndirectedGraph&); // Not implemented.
260 };
261 
262 #endif
An array holding vtkVariants.
Iterates through all edges in a graph.
An undirected graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
dynamic, self-adjusting array of vtkIdType
void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Definition: vtkType.h:275
static vtkUndirectedGraph * New()
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
a simple class to control print indentation
Definition: vtkIndent.h:38
An editable undirected graph.
#define VTKCOMMONDATAMODEL_EXPORT