User:CalebKennedy/Couple

From OpenWetWare
Jump to navigationJump to search

<HTML> <HEAD> <TITLE> C++ Couple </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD>

<BODY>

C++ Couple<VertexType, EdgeType>

Couple is a C++ template class for programming with <A href="http://openwetware.org/wiki/User:CalebKennedy/LabeledGraph">LabeledGraphs</A>.

Public methods:

<A href="#const">couple constructors & destructor</A>methods to allocate, copy, and deallocate couples                    
<A href="#oper">couple operators</A>assign and compare couples
<A href="#adjacent">adjacent</A>returns true if two vertex couples are adjacent

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

couple(void)
couple(VertexType* const, VertexType* const, const EdgeType* const)
couple(const couple&)
~couple(void)

The default couple constructor creates a <A href="http://en.wikipedia.org/wiki/Null_%28computer%29">NULL</A> labeled couple consisting of a std::pair of vertex pointers initialized to <A href="http://en.wikipedia.org/wiki/Null_%28computer%29">NULL</A>.

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

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

Couple comparison is unordered. <A href="http://en.wikipedia.org/wiki/Null_%28computer%29">NULL</A> is considered less than all (non-<A href="http://en.wikipedia.org/wiki/Null_%28computer%29">NULL</A>) values.
Vertex equality is unordered, i.e., couple(a, b) is equal to couple(b, a).

<A name="adjacent">adjacent</A>

bool adjacent(const couple&) const