Ordered pair structure s.a. More...
#include <ord_pair.hh>

Public Types | |
| typedef Object< void > | category |
| typedef ord_pair< T > | exact_t |
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. | |
| ord_pair () | |
| ord_pair (const T &val1, const T &val2) | |
| const T & | first () const |
| Get the first (lowest) member of the pair. | |
| T & | first () |
| const T & | second () const |
| Get the second (highest) member of the pair. | |
| T & | second () |
Private Attributes | |
| T | first_ |
| T | second_ |
Ordered pair structure s.a.
this->first <= this->second; ordered pairs are partially ordered using lexicographical ordering.
typedef Object<void> mln::Object< ord_pair< T > >::category [inherited] |
typedef ord_pair< T > mln::Object< ord_pair< T > >::exact_t [inherited] |
| mln::util::ord_pair< T >::ord_pair | ( | ) | [inline] |
| mln::util::ord_pair< T >::ord_pair | ( | const T & | val1, | |
| const T & | val2 | |||
| ) | [inline] |
References mln::util::ord_pair< T >::change_both().
| 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.
References mln::util::ord_pair< T >::first_, mln::util::ord_strict(), mln::util::ord_weak(), and mln::util::ord_pair< T >::second_.
Referenced by mln::util::ord_pair< T >::ord_pair().
| 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.
References mln::util::ord_pair< T >::first_, mln::util::ord_strict(), mln::util::ord_weak(), and mln::util::ord_pair< T >::second_.
| 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.
References mln::util::ord_pair< T >::first_, mln::util::ord_strict(), mln::util::ord_weak(), and mln::util::ord_pair< T >::second_.
| T & mln::util::ord_pair< T >::first | ( | ) | [inline] |
References mln::util::ord_pair< T >::first_.
| const T & mln::util::ord_pair< T >::first | ( | ) | const [inline] |
Get the first (lowest) member of the pair.
References mln::util::ord_pair< T >::first_.
Referenced by mln::util::graph::add_edge(), mln::util::site_pair< P >::first(), and mln::util::operator==().
| const T & mln::util::ord_pair< T >::second | ( | ) | const [inline] |
Get the second (highest) member of the pair.
References mln::util::ord_pair< T >::second_.
Referenced by mln::util::graph::add_edge(), mln::util::operator==(), and mln::util::site_pair< P >::second().
| T & mln::util::ord_pair< T >::second | ( | ) | [inline] |
References mln::util::ord_pair< T >::second_.
T mln::util::ord_pair< T >::first_ [private] |
T mln::util::ord_pair< T >::second_ [private] |
1.7.1