Move store outside the loop.

Looks like a typo kind of mistake: the value was computed and stored
repeatedly in the inner loop instead of once in the outer loop...
This commit is contained in:
Marc Glisse 2019-07-12 21:55:20 +02:00
parent 58e12565e3
commit b156ae6a1b
2 changed files with 2 additions and 3 deletions

View File

@ -186,11 +186,10 @@ template <class R_> struct Power_center : Store_kernel<R_> {
for(i=0; ++f!=e; ++i) {
WPoint const& wp=*f;
Point const& p=pdw(wp);
FT const& np = sdo(p) - pw(wp);
for(int j=0;j<d;++j) {
m(i,j)=2*(c(p,j)-c(p0,j));
b[i] = np - n0;
}
b[i] = sdo(p) - pw(wp) - n0;
}
CGAL_assertion (i == d);
Vec res = typename CVec::Dimension()(d);;

View File

@ -640,8 +640,8 @@ template <class R_> struct Construct_circumcenter : Store_kernel<R_> {
Point const& p=*f;
for(int j=0;j<d;++j) {
m(i,j)=2*(c(p,j)-c(p0,j));
b[i] = sdo(p) - n0;
}
b[i] = sdo(p) - n0;
}
CGAL_assertion (i == d);
Vec res = typename CVec::Dimension()(d);;