* mln/accu/center.hh: use a vector of type mln_sum(P::coord) instead
of P::vec. Avoid an overflow.
---
milena/ChangeLog | 7 +++++++
milena/mln/accu/center.hh | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 3d3cca5..933a495 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-10 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix accu::center.
+
+ * mln/accu/center.hh: use a vector of type mln_sum(P::coord) instead
+ of P::vec. Avoid an overflow.
+
2009-02-09 Guillaume Lazzara <z(a)lrde.epita.fr>
Update ICP.
diff --git a/milena/mln/accu/center.hh b/milena/mln/accu/center.hh
index aba9a80..f7caff3 100644
--- a/milena/mln/accu/center.hh
+++ b/milena/mln/accu/center.hh
@@ -73,7 +73,7 @@ namespace mln
bool is_valid() const;
protected:
- V center_;
+ algebra::vec<P::dim, mln_sum(mln_coord(P))> center_;
unsigned nsites_;
};
@@ -87,7 +87,7 @@ namespace mln
template <typename P, typename V>
struct with
{
- typedef accu::center<P,V> ret;
+ typedef accu::center<P, V> ret;
};
};
--
1.5.6.5
Show replies by date