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 -------------------------------------------------------------------------*/
37 #ifndef vtkMutableUndirectedGraph_h
38 #define vtkMutableUndirectedGraph_h
39 
40 #include "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkUndirectedGraph.h"
42 
44 class vtkGraphEdge;
45 
46 class VTKCOMMONDATAMODEL_EXPORT vtkMutableUndirectedGraph : public vtkUndirectedGraph
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
67  virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
68 
79  vtkIdType AddVertex();
80 
99  vtkIdType AddVertex(vtkVariantArray *propertyArr);
100 
116  vtkIdType AddVertex(const vtkVariant& pedigreeId);
117 
126  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
127 
140  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
141  vtkVariantArray *propertyArr);
142 
155  vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
156  vtkVariantArray *propertyArr = 0);
157 
170  vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
171  vtkVariantArray *propertyArr = 0);
172 
185  vtkEdgeType AddEdge(const vtkVariant& u,
186  const vtkVariant& v,
187  vtkVariantArray *propertyArr = 0);
188 
196  void LazyAddVertex();
197 
211  void LazyAddVertex(vtkVariantArray *propertyArr);
212 
223  void LazyAddVertex(const vtkVariant& pedigreeId);
224 
233  void LazyAddEdge(vtkIdType u, vtkIdType v);
234 
247  void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr);
248 
261  void LazyAddEdge(const vtkVariant& u, vtkIdType v,
262  vtkVariantArray *propertyArr = 0);
263 
276  void LazyAddEdge(vtkIdType u, const vtkVariant& v,
277  vtkVariantArray *propertyArr = 0);
278 
291  void LazyAddEdge(const vtkVariant& u,
292  const vtkVariant& v,
293  vtkVariantArray *propertyArr = 0);
294 
303  vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
304 
309  void RemoveVertex(vtkIdType v);
310 
315  void RemoveEdge(vtkIdType e);
316 
320  void RemoveVertices(vtkIdTypeArray* arr);
321 
325  void RemoveEdges(vtkIdTypeArray* arr);
326 
327 protected:
329  ~vtkMutableUndirectedGraph() VTK_OVERRIDE;
330 
334  vtkGraphEdge *GraphEdge;
335 
336 private:
337  vtkMutableUndirectedGraph(const vtkMutableUndirectedGraph&) VTK_DELETE_FUNCTION;
338  void operator=(const vtkMutableUndirectedGraph&) VTK_DELETE_FUNCTION;
339 };
340 
341 #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:287
static vtkUndirectedGraph * New()
A atomic type representing the union of many types.
Definition: vtkVariant.h:75
a simple class to control print indentation
Definition: vtkIndent.h:39
An editable undirected graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.