VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkUndirectedGraph Class Reference

An undirected graph. More...

#include <vtkUndirectedGraph.h>

Inheritance diagram for vtkUndirectedGraph:
Inheritance graph
[legend]
Collaboration diagram for vtkUndirectedGraph:
Collaboration graph
[legend]

List of all members.

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 bool IsStructureValid (vtkGraph *g)
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 vtkUndirectedGraphNew ()
static int IsTypeOf (const char *type)
static vtkUndirectedGraphSafeDownCast (vtkObject *o)
static vtkUndirectedGraphGetData (vtkInformation *info)
static vtkUndirectedGraphGetData (vtkInformationVector *v, int i=0)

Protected Member Functions

 vtkUndirectedGraph ()
 ~vtkUndirectedGraph ()
virtual void GetInEdges (vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges)

Detailed Description

An undirected graph.

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().

See also:
vtkGraph vtkMutableUndirectedGraph
Examples:
vtkUndirectedGraph (Examples)
Tests:
vtkUndirectedGraph (Tests)

Definition at line 52 of file vtkUndirectedGraph.h.


Member Typedef Documentation

Reimplemented from vtkGraph.

Reimplemented in vtkMolecule, and vtkMutableUndirectedGraph.

Definition at line 56 of file vtkUndirectedGraph.h.


Constructor & Destructor Documentation

vtkUndirectedGraph::vtkUndirectedGraph ( ) [protected]
vtkUndirectedGraph::~vtkUndirectedGraph ( ) [protected]

Member Function Documentation

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 vtkMolecule, and vtkMutableUndirectedGraph.

virtual const char* vtkUndirectedGraph::GetClassName ( ) [virtual]

Reimplemented from vtkGraph.

Reimplemented in vtkMolecule, and vtkMutableUndirectedGraph.

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 vtkMolecule, and 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 vtkMolecule, and vtkMutableUndirectedGraph.

static vtkUndirectedGraph* vtkUndirectedGraph::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkGraph.

Reimplemented in vtkMolecule, and vtkMutableUndirectedGraph.

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 vtkMolecule, and 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.

virtual vtkIdType vtkUndirectedGraph::GetInDegree ( vtkIdType  v) [virtual]

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) [virtual]

Check the structure, and accept it if it is a valid undirected graph. This is public to allow the ToDirected/UndirectedGraph to work.

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.


The documentation for this class was generated from the following file: