mirror of https://github.com/CGAL/cgal
force convertion to exact number type (avoid ambiguous call to cmp operators)
This commit is contained in:
parent
4db540c6c8
commit
269c83e8a5
|
|
@ -56,13 +56,13 @@ int main() {
|
|||
Solution::Infeasibility_certificate_iterator y =
|
||||
s.infeasibility_certificate_begin();
|
||||
// check y >= 0
|
||||
assert (y[0] >= 0);
|
||||
assert (y[1] >= 0);
|
||||
assert (ET(y[0]) >= 0);
|
||||
assert (ET(y[1]) >= 0);
|
||||
// check y^T A >= 0
|
||||
assert (y[0] * A[0][0] + y[1] * A[0][1] >= 0);
|
||||
assert (y[0] * A[1][0] + y[1] * A[1][1] >= 0);
|
||||
assert (ET(y[0]) * A[0][0] + ET(y[1]) * A[0][1] >= 0);
|
||||
assert (ET(y[0]) * A[1][0] + ET(y[1]) * A[1][1] >= 0);
|
||||
// check y^T b < 0
|
||||
assert (y[0] * b[0] + y[1] * b[1] < 0);
|
||||
assert (ET(y[0]) * b[0] + ET(y[1]) * b[1] < 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ int main() {
|
|||
Solution::Unboundedness_certificate_iterator w =
|
||||
s.unboundedness_certificate_begin();
|
||||
// check w >= 0
|
||||
assert (w[0] >= 0);
|
||||
assert (w[1] >= 0);
|
||||
assert (ET(w[0]) >= 0);
|
||||
assert (ET(w[1]) >= 0);
|
||||
// check A w <= 0
|
||||
assert (A[0][0] * w[0] + A[1][0] * w[1] <= 0);
|
||||
assert (A[0][1] * w[0] + A[1][1] * w[1] <= 0);
|
||||
assert (A[0][0] * ET(w[0]) + A[1][0] * ET(w[1]) <= 0);
|
||||
assert (A[0][1] * ET(w[0]) + A[1][1] * ET(w[1]) <= 0);
|
||||
// check c^T w < 0
|
||||
assert (c[0] * w[0] + c[1] * w[1] < 0);
|
||||
assert (c[0] * ET(w[0]) + c[1] * ET(w[1]) < 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue