VTK
vtkUndirectedGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUndirectedGraph.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 -------------------------------------------------------------------------*/
48 #ifndef vtkUndirectedGraph_h
49 #define vtkUndirectedGraph_h
50 
51 #include "vtkCommonDataModelModule.h" // For export macro
52 #include "vtkGraph.h"
53 
54 class VTKCOMMONDATAMODEL_EXPORT vtkUndirectedGraph : public vtkGraph
55 {
56 public:
58  vtkTypeMacro(vtkUndirectedGraph, vtkGraph);
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
64  int GetDataObjectType() override {return VTK_UNDIRECTED_GRAPH;}
65 
70 
76 
83  void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) override
84  { this->Superclass::GetInEdge(v, i, e); }
85 
87 
93 
98  void GetInEdges(vtkIdType v, vtkInEdgeIterator *it) override
99  { Superclass::GetInEdges(v, it); }
100 
106  bool IsStructureValid(vtkGraph *g) override;
107 
108 protected:
111 
116  vtkIdType & nedges) override;
117 
118 private:
119  vtkUndirectedGraph(const vtkUndirectedGraph&) = delete;
120  void operator=(const vtkUndirectedGraph&) = delete;
121 };
122 
123 #endif
vtkUndirectedGraph::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkUndirectedGraph.h:64
edges
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:859
vtkUndirectedGraph
An undirected graph.
Definition: vtkUndirectedGraph.h:55
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkInEdgeIterator
Iterates through all incoming edges to a vertex.
Definition: vtkInEdgeIterator.h:49
vtkUndirectedGraph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInEdgeType
Definition: vtkGraph.h:268
vtkUndirectedGraph::vtkUndirectedGraph
vtkUndirectedGraph()
vtkUndirectedGraph::GetInEdges
void GetInEdges(vtkIdType v, vtkInEdgeIterator *it) override
Initialize the iterator to get the incoming edges to a vertex.
Definition: vtkUndirectedGraph.h:98
vtkUndirectedGraph::GetInDegree
vtkIdType GetInDegree(vtkIdType v) override
Returns the full degree of the vertex.
VTK_UNDIRECTED_GRAPH
#define VTK_UNDIRECTED_GRAPH
Definition: vtkType.h:115
vtkUndirectedGraph::GetData
static vtkUndirectedGraph * GetData(vtkInformationVector *v, int i=0)
vtkUndirectedGraph::GetInEdges
void GetInEdges(vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges) override
For iterators, returns the same edge list as GetOutEdges().
vtkUndirectedGraph::~vtkUndirectedGraph
~vtkUndirectedGraph() override
vtkUndirectedGraph::GetData
static vtkUndirectedGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
vtkGraphEdge
Representation of a single graph edge.
Definition: vtkGraphEdge.h:40
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkGraph.h
vtkUndirectedGraph::GetInEdge
void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge *e) override
Random-access method for retrieving incoming edges to vertex v.
Definition: vtkUndirectedGraph.h:83
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkUndirectedGraph::GetInEdge
vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType i) override
Random-access method for retrieving the in edges of a vertex.
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:288
vtkUndirectedGraph::New
static vtkUndirectedGraph * New()
vtkUndirectedGraph::IsStructureValid
bool IsStructureValid(vtkGraph *g) override
Check the structure, and accept it if it is a valid undirected graph.