improved lexx compare

This commit is contained in:
Michael Hemmer 2009-08-17 07:28:32 +00:00
parent 7eee2b6780
commit 3923e6a15d
1 changed files with 4 additions and 13 deletions

View File

@ -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 ) {