VTK
vtkGraphInternals.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphInternals.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
27 #ifndef __vtkGraphInternals_h
28 #define __vtkGraphInternals_h
29 
30 #include "vtkGraph.h"
31 
32 #include <vtksys/stl/vector> // STL Header
33 #include <vtksys/stl/map> // STL Header
34 
35 //----------------------------------------------------------------------------
36 // class vtkVertexAdjacencyList
37 //----------------------------------------------------------------------------
38 //BTX
40 {
41 public:
42  vtksys_stl::vector<vtkInEdgeType> InEdges;
43  vtksys_stl::vector<vtkOutEdgeType> OutEdges;
44 };
45 //ETX
46 
47 //----------------------------------------------------------------------------
48 // class vtkGraphInternals
49 //----------------------------------------------------------------------------
51 {
52 public:
53  static vtkGraphInternals *New();
54  //BTX
55  vtkTypeMacro(vtkGraphInternals, vtkObject);
56  vtksys_stl::vector<vtkVertexAdjacencyList> Adjacency;
57  //ETX
59 
63 
64  // Whether we have used pedigree IDs to refer to the vertices of the
65  // graph, e.g., to add edges or vertices. In a distributed graph,
66  // the pedigree-id interface is mutually exclusive with the
67  // no-argument AddVertex() function in vtkMutableUndirectedGraph and
68  // vtkMutableDirectedGraph.
70 
71  //BTX
73  void RemoveEdgeFromOutList(vtkIdType e, vtksys_stl::vector<vtkOutEdgeType>& outEdges);
74 
76  void RemoveEdgeFromInList(vtkIdType e, vtksys_stl::vector<vtkInEdgeType>& inEdges);
77 
79  void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, vtksys_stl::vector<vtkOutEdgeType>& outEdges);
80 
82 
83  void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, vtksys_stl::vector<vtkInEdgeType>& inEdges);
84  //ETX
86 
87 protected:
90 
91 private:
92  vtkGraphInternals(const vtkGraphInternals&); // Not implemented.
93  void operator=(const vtkGraphInternals&); // Not implemented.
94 };
95 
96 #endif // __vtkGraphInternals_h
97