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 ----------------------------------------------------------------------------*/
28 #ifndef vtkGraphInternals_h
29 #define vtkGraphInternals_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkGraph.h"
33 
34 #include <vector> // STL Header
35 #include <map> // STL Header
36 
37 //----------------------------------------------------------------------------
38 // class vtkVertexAdjacencyList
39 //----------------------------------------------------------------------------
40 
42 {
43 public:
44  std::vector<vtkInEdgeType> InEdges;
45  std::vector<vtkOutEdgeType> OutEdges;
46 };
47 
48 //----------------------------------------------------------------------------
49 // class vtkGraphInternals
50 //----------------------------------------------------------------------------
51 class VTKCOMMONDATAMODEL_EXPORT vtkGraphInternals : public vtkObject
52 {
53 public:
54  static vtkGraphInternals *New();
55 
56  vtkTypeMacro(vtkGraphInternals, vtkObject);
57  std::vector<vtkVertexAdjacencyList> Adjacency;
58 
60 
64 
65  // Whether we have used pedigree IDs to refer to the vertices of the
66  // graph, e.g., to add edges or vertices. In a distributed graph,
67  // the pedigree-id interface is mutually exclusive with the
68  // no-argument AddVertex() function in vtkMutableUndirectedGraph and
69  // vtkMutableDirectedGraph.
71 
75  void RemoveEdgeFromOutList(vtkIdType e, std::vector<vtkOutEdgeType>& outEdges);
76 
80  void RemoveEdgeFromInList(vtkIdType e, std::vector<vtkInEdgeType>& inEdges);
81 
85  void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector<vtkOutEdgeType>& outEdges);
86 
90  void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector<vtkInEdgeType>& inEdges);
91 
92 protected:
94  ~vtkGraphInternals() VTK_OVERRIDE;
95 
96 private:
97  vtkGraphInternals(const vtkGraphInternals&) VTK_DELETE_FUNCTION;
98  void operator=(const vtkGraphInternals&) VTK_DELETE_FUNCTION;
99 };
100 
101 #endif // vtkGraphInternals_h
102 
103 // VTK-HeaderTest-Exclude: vtkGraphInternals.h
abstract base class for most VTK objects
Definition: vtkObject.h:59
int vtkIdType
Definition: vtkType.h:287
std::vector< vtkOutEdgeType > OutEdges
std::vector< vtkInEdgeType > InEdges
Internal representation of vtkGraph.
vtkIdType LastRemoteEdgeSource
vtkIdType LastRemoteEdgeTarget
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkIdType LastRemoteEdgeId