fixed precond for swapped cpa

This commit is contained in:
Eric Berberich 2008-01-26 16:07:44 +00:00
parent df9c4e83b5
commit ec806515a3
1 changed files with 28 additions and 22 deletions

View File

@ -234,19 +234,22 @@ public:
Status_line_1 line(i, arcs, *this);
CGAL_precondition_code(
int typo;
typename Status_line_1::Arc_pair pair;
for(int j = 0; j < slice.num_arcs(); j++) {
pair = line.curves_at_event(j);
if(pair.first != -1 && pair.second != -1)
typo = 2;
else
typo = (pair.first != -1 ? 0 : 1);
/*std::cout << "[" << pair.first << "; " << pair.second << "] and " <<
(int)(slice.arc_at_event(j).first) << "\n";*/
CGAL_precondition(typo == slice.arc_at_event(j).first);
}
int typo;
typename Status_line_1::Arc_pair pair;
for (int j = 0; j < slice.num_arcs(); j++) {
pair = line.curves_at_event(j);
if (pair.first != -1 && pair.second != -1) {
typo = 2;
} else {
typo = (pair.first != -1 ? 0 : 1);
if (this->ptr()->_m_swapped) {
typo = 1 - typo;
}
}
/*std::cout << "[" << pair.first << "; " << pair.second << "] and " <<
(int)(slice.arc_at_event(j).first) << "\n";*/
CGAL_precondition(typo == slice.arc_at_event(j).first);
}
);
return line;
#endif // CGAL_ACK_2_USE_STATUS_LINES
@ -277,15 +280,18 @@ public:
Status_line_1 line(i, arcs, *this);
CGAL_precondition_code(
int typo;
typename Status_line_1::Arc_pair pair;
for(int j = 0; j < slice.num_arcs(); j++) {
pair = line.curves_at_event(j);
typo = (pair.first != -1 ? 0 : 1);
CGAL_precondition(typo == slice.arc_at_interval(j));
} );
int typo;
typename Status_line_1::Arc_pair pair;
for (int j = 0; j < slice.num_arcs(); j++) {
pair = line.curves_at_event(j);
typo = (pair.first != -1 ? 0 : 1);
if (this->ptr()->_m_swapped) {
typo = 1 - typo;
}
CGAL_precondition(typo == slice.arc_at_interval(j));
}
);
return line;
#endif // CGAL_ACK_2_USE_STATUS_LINES
}