SyFi
0.3
|
#include <OrderedPtvSet.h>
Public Member Functions | |
OrderedPtvSet () | |
OrderedPtvSet (const Ptv &p0, const Ptv &p1) | |
OrderedPtvSet (const Ptv &p0, const Ptv &p1, const Ptv &p2) | |
OrderedPtvSet (const Ptv &p0, const Ptv &p1, const Ptv &p2, const Ptv &p3) | |
virtual | ~OrderedPtvSet () |
void | append (const Ptv &p) |
unsigned int | size () const |
const Ptv & | operator[] (unsigned int i) const |
Ptv & | operator[] (unsigned int i) |
OrderedPtvSet & | operator= (const OrderedPtvSet &p) |
bool | less (const OrderedPtvSet &s) const |
Private Attributes | |
vector< Ptv > | Ptvs |
Definition at line 38 of file OrderedPtvSet.h.
Definition at line 29 of file OrderedPtvSet.cpp.
{ }
SyFi::OrderedPtvSet::OrderedPtvSet | ( | const Ptv & | p0, |
const Ptv & | p1 | ||
) |
Definition at line 38 of file OrderedPtvSet.cpp.
References Ptvs.
{ Ptvs.push_back(p0); Ptvs.push_back(p1); std::sort(Ptvs.begin(), Ptvs.end(), Ptv_is_less()); }
SyFi::OrderedPtvSet::OrderedPtvSet | ( | const Ptv & | p0, |
const Ptv & | p1, | ||
const Ptv & | p2 | ||
) |
Definition at line 45 of file OrderedPtvSet.cpp.
References Ptvs.
SyFi::OrderedPtvSet::OrderedPtvSet | ( | const Ptv & | p0, |
const Ptv & | p1, | ||
const Ptv & | p2, | ||
const Ptv & | p3 | ||
) |
Definition at line 53 of file OrderedPtvSet.cpp.
References Ptvs.
SyFi::OrderedPtvSet::~OrderedPtvSet | ( | ) | [virtual] |
void SyFi::OrderedPtvSet::append | ( | const Ptv & | p | ) |
Definition at line 62 of file OrderedPtvSet.cpp.
References Ptvs.
{ Ptvs.push_back(p); std::sort(Ptvs.begin(), Ptvs.end(), Ptv_is_less()); }
bool SyFi::OrderedPtvSet::less | ( | const OrderedPtvSet & | s | ) | const |
Definition at line 96 of file OrderedPtvSet.cpp.
References less(), Ptvs, and size().
Referenced by less(), and SyFi::OrderedPtvSet_is_less::operator()().
{ if ( Ptvs.size() < p.size() ) return true ; if ( Ptvs.size() > p.size() ) return false; for (unsigned int i=Ptvs.size()-1; i>= 0; i--) { if ( Ptvs[i].less(p[i]) && p[i].less(Ptvs[i])) { } else if ( Ptvs[i].less(p[i]) ) { return true; } else if ( p[i].less(Ptvs[i]) ) { return false; } } return false; }
OrderedPtvSet & SyFi::OrderedPtvSet::operator= | ( | const OrderedPtvSet & | p | ) |
const Ptv & SyFi::OrderedPtvSet::operator[] | ( | unsigned int | i | ) | const |
Ptv & SyFi::OrderedPtvSet::operator[] | ( | unsigned int | i | ) |
unsigned int SyFi::OrderedPtvSet::size | ( | ) | const |
Definition at line 68 of file OrderedPtvSet.cpp.
References Ptvs.
Referenced by less(), SyFi::operator<<(), and operator=().
{ return Ptvs.size(); }
vector<Ptv> SyFi::OrderedPtvSet::Ptvs [private] |
Definition at line 40 of file OrderedPtvSet.h.
Referenced by append(), less(), operator=(), operator[](), OrderedPtvSet(), size(), and ~OrderedPtvSet().