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 -------------------------------------------------------------------------*/
34 #ifndef vtkMutableUndirectedGraph_h
35 #define vtkMutableUndirectedGraph_h
36 
37 #include "vtkCommonDataModelModule.h" // For export macro
38 #include "vtkUndirectedGraph.h"
39 
41 class vtkGraphEdge;
42 
43 class VTKCOMMONDATAMODEL_EXPORT vtkMutableUndirectedGraph : public vtkUndirectedGraph
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
64  virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
65 
76  vtkIdType AddVertex();
77 
96  vtkIdType AddVertex(vtkVariantArray *propertyArr);
97 
113  vtkIdType AddVertex(const vtkVariant& pedigreeId);
114 
123  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
124 
137  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
138  vtkVariantArray *propertyArr);
139 
152  vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
153  vtkVariantArray *propertyArr = 0);
154 
167  vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
168  vtkVariantArray *propertyArr = 0);
169 
182  vtkEdgeType AddEdge(const vtkVariant& u,
183  const vtkVariant& v,
184  vtkVariantArray *propertyArr = 0);
185 
193  void LazyAddVertex();
194 
208  void LazyAddVertex(vtkVariantArray *propertyArr);
209 
220  void LazyAddVertex(const vtkVariant& pedigreeId);
221 
230  void LazyAddEdge(vtkIdType u, vtkIdType v);
231 
244  void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr);
245 
258  void LazyAddEdge(const vtkVariant& u, vtkIdType v,
259  vtkVariantArray *propertyArr = 0);
260 
273  void LazyAddEdge(vtkIdType u, const vtkVariant& v,
274  vtkVariantArray *propertyArr = 0);
275 
288  void LazyAddEdge(const vtkVariant& u,
289  const vtkVariant& v,
290  vtkVariantArray *propertyArr = 0);
291 
300  vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
301 
306  void RemoveVertex(vtkIdType v);
307 
312  void RemoveEdge(vtkIdType e);
313 
317  void RemoveVertices(vtkIdTypeArray* arr);
318 
322  void RemoveEdges(vtkIdTypeArray* arr);
323 
324 protected:
326  ~vtkMutableUndirectedGraph() VTK_OVERRIDE;
327 
331  vtkGraphEdge *GraphEdge;
332 
333 private:
334  vtkMutableUndirectedGraph(const vtkMutableUndirectedGraph&) VTK_DELETE_FUNCTION;
335  void operator=(const vtkMutableUndirectedGraph&) VTK_DELETE_FUNCTION;
336 };
337 
338 #endif
An array holding vtkVariants.
Iterates through all edges in a graph.
An undirected graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:39
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
static vtkUndirectedGraph * New()
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
a simple class to control print indentation
Definition: vtkIndent.h:33
An editable undirected graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.