From OpenWetWare
Jump to: navigation, search

<HTML> <HEAD> <TITLE> C++ Vertex </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT="Caleb Kennedy"> <META NAME="Keywords" CONTENT="Vertex"> <META NAME="Description" CONTENT="C++ template class for programming with labeled vertices and edges"> </HEAD>


C++ Vertex<VertexType, EdgeType>

Vertex is a C++ template class for programming with labeled vertices, edges, and <A href="">LabeledGraphs</A>

Public methods:

<A href="#const">Vertex constructors & destructor</A>methods to allocate, copy, and deallocate vertices                    
<A href="#oper">Vertex operators</A>assign and compare vertices
<A href="#begin">begin</A>returns an iterator to the first vertex adjacent to this vertex
<A href="#end">end</A>returns an iterator just past the last vertex adjacent to this vertex

<A name="const">Vertex constructors and destructor</A>

Vertex(const unsigned long&)
Vertex(const Vertex&)

The default Vertex constructor creates an unvisited <A href="">NULL</A>-labeled vertex of <A href="">degree</A> zero (no outgoing edges).

<A name="oper">Vertex operators</A>

bool operator<(const Vertex&) const
bool operator==(const Vertex&) const
bool operator!=(const Vertex&) const
Vertex& operator=(const Vertex&)

Vertex comparison is based on the Vertex's label value. <A href="">NULL</A> is considered less than all (non-<A href="">NULL</A>) values.
Two vertices are equal if their degrees and labels are equivalent.