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{
43public:
44 std::vector<vtkInEdgeType> InEdges;
45 std::vector<vtkOutEdgeType> OutEdges;
46};
47
48//----------------------------------------------------------------------------
49// class vtkGraphInternals
50//----------------------------------------------------------------------------
51class VTKCOMMONDATAMODEL_EXPORT vtkGraphInternals : public vtkObject
52{
53public:
55
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
92protected:
94 ~vtkGraphInternals() VTK_OVERRIDE;
95
96private:
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
Internal representation of vtkGraph.
void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector< vtkInEdgeType > &inEdges)
Convenience method for renaming an edge in an in edge list.
void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for renaming an edge in an out edge list.
std::vector< vtkVertexAdjacencyList > Adjacency
vtkIdType LastRemoteEdgeId
void RemoveEdgeFromOutList(vtkIdType e, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for removing an edge from an out edge list.
vtkIdType LastRemoteEdgeSource
vtkIdType LastRemoteEdgeTarget
void RemoveEdgeFromInList(vtkIdType e, std::vector< vtkInEdgeType > &inEdges)
Convenience method for removing an edge from an in edge list.
static vtkGraphInternals * New()
~vtkGraphInternals() override
abstract base class for most VTK objects
Definition: vtkObject.h:60
std::vector< vtkInEdgeType > InEdges
std::vector< vtkOutEdgeType > OutEdges
int vtkIdType
Definition: vtkType.h:287