VTK  9.1.0
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-------------------------------------------------------------------------*/
81#ifndef vtkUndirectedGraph_h
82#define vtkUndirectedGraph_h
83
84#include "vtkCommonDataModelModule.h" // For export macro
85#include "vtkGraph.h"
86
87class VTKCOMMONDATAMODEL_EXPORT vtkUndirectedGraph : public vtkGraph
88{
89public:
92 void PrintSelf(ostream& os, vtkIndent indent) override;
93
97 int GetDataObjectType() override { return VTK_UNDIRECTED_GRAPH; }
98
103
109
117 {
118 this->Superclass::GetInEdge(v, i, e);
119 }
120
122
128
133 void GetInEdges(vtkIdType v, vtkInEdgeIterator* it) override { Superclass::GetInEdges(v, it); }
134
140 bool IsStructureValid(vtkGraph* g) override;
141
142protected:
145
149 void GetInEdges(vtkIdType v, const vtkInEdgeType*& edges, vtkIdType& nedges) override;
150
151private:
152 vtkUndirectedGraph(const vtkUndirectedGraph&) = delete;
153 void operator=(const vtkUndirectedGraph&) = delete;
154};
155
156#endif
Representation of a single graph edge.
Definition: vtkGraphEdge.h:40
Base class for graph data types.
Definition: vtkGraph.h:339
Iterates through all incoming edges to a vertex.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
An undirected graph.
int GetDataObjectType() override
Return what type of dataset this is.
vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType i) override
Random-access method for retrieving the in edges of a vertex.
static vtkUndirectedGraph * New()
static vtkUndirectedGraph * GetData(vtkInformationVector *v, int i=0)
Retrieve a graph from an information vector.
void GetInEdges(vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges) override
For iterators, returns the same edge list as GetOutEdges().
void GetInEdges(vtkIdType v, vtkInEdgeIterator *it) override
Initialize the iterator to get the incoming edges to a vertex.
bool IsStructureValid(vtkGraph *g) override
Check the structure, and accept it if it is a valid undirected graph.
static vtkUndirectedGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
~vtkUndirectedGraph() override
vtkIdType GetInDegree(vtkIdType v) override
Returns the full degree of the vertex.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge *e) override
Random-access method for retrieving incoming edges to vertex v.
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
int vtkIdType
Definition: vtkType.h:332
#define VTK_UNDIRECTED_GRAPH
Definition: vtkType.h:101