mirror of https://github.com/CGAL/cgal
improved lexx compare
This commit is contained in:
parent
7eee2b6780
commit
3923e6a15d
|
|
@ -121,19 +121,10 @@ public:
|
|||
|
||||
// this is the actual change
|
||||
bool operator<( const Exponent_vector& ev ) const {
|
||||
CGAL_precondition(this->size() == ev.size());
|
||||
const_reverse_iterator rit1(this->rbegin());
|
||||
const_reverse_iterator rit2(ev.rbegin());
|
||||
while(rit1!=this->rend()){
|
||||
if(*rit1 < *rit2) return true;
|
||||
if(*rit1 > *rit2) return false;
|
||||
rit1++; rit2++;
|
||||
}
|
||||
CGAL_postcondition(rit1 == this->rend());
|
||||
CGAL_postcondition(rit2 == ev.rend());
|
||||
return false;
|
||||
}
|
||||
|
||||
return std::lexicographical_compare (
|
||||
this->rbegin(), this->rend(), ev.rbegin(), ev.rend());
|
||||
}
|
||||
|
||||
void output_benchmark( std::ostream& os ) const {
|
||||
os << "( ";
|
||||
for( unsigned i = 0; i < size(); ++i ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue