mln::util::ord_pair< T > Struct Template Reference
[Utilities]

Ordered pair structure s.a. More...

#include <ord_pair.hh>

Inheritance diagram for mln::util::ord_pair< T >:

Inheritance graph

List of all members.

Public Member Functions

void change_both (const T &first, const T &second)
 Replace both members of the pair by val, while keeping the relative order.
void change_first (const T &val)
 Replace the first member of the pair by val, while keeping the relative order.
void change_second (const T &val)
 Replace the second member of the pair by val, while keeping the relative order.
const T & first () const
 Get the first (lowest) member of the pair.
const T & second () const
 Get the second (highest) member of the pair.


Detailed Description

template<typename T>
struct mln::util::ord_pair< T >

Ordered pair structure s.a.

this->first <= this->second; ordered pairs are partially ordered using lexicographical ordering.


Member Function Documentation

template<typename T >
void mln::util::ord_pair< T >::change_both ( const T &  first,
const T &  second 
) [inline]

Replace both members of the pair by val, while keeping the relative order.

Postcondition:
first_ <= second_ (with <= being the mln::util::ord_weak relationship).

References mln::util::ord_strict(), and mln::util::ord_weak().

template<typename T >
void mln::util::ord_pair< T >::change_first ( const T &  val  )  [inline]

Replace the first member of the pair by val, while keeping the relative order.

Postcondition:
first_ <= second_ (with <= being the mln::util::ord_weak relationship).

References mln::util::ord_strict(), and mln::util::ord_weak().

template<typename T >
void mln::util::ord_pair< T >::change_second ( const T &  val  )  [inline]

Replace the second member of the pair by val, while keeping the relative order.

Postcondition:
first_ <= second_ (with <= being the mln::util::ord_weak relationship).

References mln::util::ord_strict(), and mln::util::ord_weak().

template<typename T >
const T & mln::util::ord_pair< T >::first (  )  const [inline]

Get the first (lowest) member of the pair.

template<typename T >
const T & mln::util::ord_pair< T >::second (  )  const [inline]

Get the second (highest) member of the pair.


Generated on Tue Jul 14 16:33:18 2009 for Milena (Olena) by  doxygen 1.5.9