#include <vtkUndirectedGraph.h>
vtkUndirectedGraph is a collection of vertices along with a collection of undirected edges (they connect two vertices in no particular order). ShallowCopy(), DeepCopy(), CheckedShallowCopy(), CheckedDeepCopy() accept instances of vtkUndirectedGraph and vtkMutableUndirectedGraph. GetOutEdges(v, it) and GetInEdges(v, it) return the same list of edges, which is the list of all edges which have a v as an endpoint. GetInDegree(v), GetOutDegree(v) and GetDegree(v) all return the full degree of vertex v.
vtkUndirectedGraph is read-only. To create an undirected graph, use an instance of vtkMutableUndirectedGraph, then you may set the structure to a vtkUndirectedGraph using ShallowCopy().
Definition at line 52 of file vtkUndirectedGraph.h.
Public Types | |
typedef vtkGraph | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | GetDataObjectType () |
virtual vtkIdType | GetInDegree (vtkIdType v) |
virtual vtkInEdgeType | GetInEdge (vtkIdType v, vtkIdType i) |
virtual void | GetInEdge (vtkIdType v, vtkIdType i, vtkGraphEdge *e) |
virtual void | GetInEdges (vtkIdType v, vtkInEdgeIterator *it) |
Static Public Member Functions | |
static vtkUndirectedGraph * | New () |
static int | IsTypeOf (const char *type) |
static vtkUndirectedGraph * | SafeDownCast (vtkObject *o) |
static vtkUndirectedGraph * | GetData (vtkInformation *info) |
static vtkUndirectedGraph * | GetData (vtkInformationVector *v, int i=0) |
Protected Member Functions | |
vtkUndirectedGraph () | |
~vtkUndirectedGraph () | |
virtual bool | IsStructureValid (vtkGraph *g) |
virtual void | GetInEdges (vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges) |
Reimplemented from vtkGraph.
Reimplemented in vtkMutableUndirectedGraph.
Definition at line 56 of file vtkUndirectedGraph.h.
vtkUndirectedGraph::vtkUndirectedGraph | ( | ) | [protected] |
vtkUndirectedGraph::~vtkUndirectedGraph | ( | ) | [protected] |
static vtkUndirectedGraph* vtkUndirectedGraph::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkDataObject.
Reimplemented in vtkMutableUndirectedGraph.
virtual const char* vtkUndirectedGraph::GetClassName | ( | ) | [virtual] |
static int vtkUndirectedGraph::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkGraph.
Reimplemented in vtkMutableUndirectedGraph.
virtual int vtkUndirectedGraph::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkGraph.
Reimplemented in vtkMutableUndirectedGraph.
static vtkUndirectedGraph* vtkUndirectedGraph::SafeDownCast | ( | vtkObject * | o | ) | [static] |
void vtkUndirectedGraph::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkGraph.
Reimplemented in vtkMutableUndirectedGraph.
virtual int vtkUndirectedGraph::GetDataObjectType | ( | ) | [inline, virtual] |
Return what type of dataset this is.
Reimplemented from vtkGraph.
Definition at line 60 of file vtkUndirectedGraph.h.
Returns the full degree of the vertex.
Reimplemented from vtkGraph.
virtual vtkInEdgeType vtkUndirectedGraph::GetInEdge | ( | vtkIdType | v, | |
vtkIdType | i | |||
) | [virtual] |
Random-access method for retrieving the in edges of a vertex. For an undirected graph, this is the same as the out edges.
Reimplemented from vtkGraph.
virtual void vtkUndirectedGraph::GetInEdge | ( | vtkIdType | v, | |
vtkIdType | i, | |||
vtkGraphEdge * | e | |||
) | [inline, virtual] |
Random-access method for retrieving incoming edges to vertex v. The method fills the vtkGraphEdge instance with the id, source, and target of the edge. This method is provided for wrappers, GetInEdge(vtkIdType, vtkIdType) is preferred.
Reimplemented from vtkGraph.
Definition at line 78 of file vtkUndirectedGraph.h.
static vtkUndirectedGraph* vtkUndirectedGraph::GetData | ( | vtkInformation * | info | ) | [static] |
Retrieve a graph from an information vector.
Reimplemented from vtkGraph.
static vtkUndirectedGraph* vtkUndirectedGraph::GetData | ( | vtkInformationVector * | v, | |
int | i = 0 | |||
) | [static] |
Retrieve a graph from an information vector.
Reimplemented from vtkGraph.
virtual void vtkUndirectedGraph::GetInEdges | ( | vtkIdType | v, | |
vtkInEdgeIterator * | it | |||
) | [inline, virtual] |
Initialize the iterator to get the incoming edges to a vertex. For an undirected graph, this is all incident edges.
Reimplemented from vtkGraph.
Definition at line 93 of file vtkUndirectedGraph.h.
virtual bool vtkUndirectedGraph::IsStructureValid | ( | vtkGraph * | g | ) | [protected, virtual] |
Check the structure, and accept it if it is a valid undirected graph.
Implements vtkGraph.
virtual void vtkUndirectedGraph::GetInEdges | ( | vtkIdType | v, | |
const vtkInEdgeType *& | edges, | |||
vtkIdType & | nedges | |||
) | [protected, virtual] |
For iterators, returns the same edge list as GetOutEdges().
Reimplemented from vtkGraph.