User:CalebKennedy/Couple

From OpenWetWare

Jump to: navigation, search

C++ Couple

C++ Couple<VertexType, EdgeType>

Couple is a C++ template class for programming with LabeledGraphs.

Public methods:

couple constructors & destructormethods to allocate, copy, and deallocate couples                    
couple operatorsassign and compare couples
adjacentreturns true if two vertex couples are adjacent
couple constructors and destructor

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

The default couple constructor creates a NULL labeled couple consisting of a std::pair of vertex pointers initialized to NULL.

couple operators

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

Couple comparison is unordered. NULL is considered less than all (non-NULL) values.
Vertex equality is unordered, i.e., couple(a, b) is equal to couple(b, a).

adjacent

bool adjacent(const couple&) const

Personal tools