last-svn-commit-170-g7c28140 Help Swilena wrap mln::complex<D>.

* mln/topo/complex.hh: Use `0' instead of `0u' as template parameter. --- milena/ChangeLog | 7 +++++++ milena/mln/topo/complex.hh | 38 +++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 900ebd8..f807228 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,10 @@ +2010-04-08 Roland Levillain <roland@lrde.epita.fr> + + Help Swilena wrap mln::complex<D>. + + * mln/topo/complex.hh: Use `0' instead of `0u' as template + parameter. + 2010-05-11 Roland Levillain <roland@lrde.epita.fr> Miscellaneous changes in graphs and graph-based images. diff --git a/milena/mln/topo/complex.hh b/milena/mln/topo/complex.hh index 3662396..2ecb551 100644 --- a/milena/mln/topo/complex.hh +++ b/milena/mln/topo/complex.hh @@ -107,7 +107,7 @@ namespace mln complex(); /// Add a 0-face to the complex. - n_face<0u, D> add_face(); + n_face<0, D> add_face(); /// Add a \p (N+1)-face to the complex (with \p N >= 0). /// @@ -369,9 +369,9 @@ namespace mln /// Faces of lowest dimension (0). template <unsigned D> - struct faces_set_mixin<0u, D> : public higher_dim_faces_set_mixin<0u, D> + struct faces_set_mixin<0, D> : public higher_dim_faces_set_mixin<0, D> { - std::vector< face_data<0u, D> > faces_; + std::vector< face_data<0, D> > faces_; /// Pretty-printing. /// \{ @@ -396,9 +396,9 @@ namespace mln /// Faces of a 0-complex. template <> - struct faces_set_mixin<0u, 0u> + struct faces_set_mixin<0, 0> { - std::vector< face_data<0u, 0u> > faces_; + std::vector< face_data<0, 0> > faces_; /// Pretty-printing. /// \{ @@ -475,14 +475,14 @@ namespace mln template <unsigned D> inline - n_face<0u, D> + n_face<0, D> complex<D>::add_face() { /* FIXME: This is not thread-proof (these two lines should form an atomic section). */ - data_->internal::faces_set_mixin<0u, D>::faces_.push_back(face_data<0u, D>()); - unsigned id = nfaces_of_static_dim<0u>() - 1; - return n_face<0u, D>(*this, id); + data_->internal::faces_set_mixin<0, D>::faces_.push_back(face_data<0, D>()); + unsigned id = nfaces_of_static_dim<0>() - 1; + return n_face<0, D>(*this, id); } template <unsigned D> @@ -716,7 +716,7 @@ namespace mln template <unsigned D> inline void - faces_set_mixin<0u, D>::print_rec_asc(std::ostream& ostr) const + faces_set_mixin<0, D>::print_rec_asc(std::ostream& ostr) const { print(ostr); } @@ -732,7 +732,7 @@ namespace mln inline void - faces_set_mixin<0u, 0u>::print_rec_asc(std::ostream& ostr) const + faces_set_mixin<0, 0>::print_rec_asc(std::ostream& ostr) const { print(ostr); } @@ -760,9 +760,9 @@ namespace mln template <unsigned D> inline void - faces_set_mixin<0u, D>::print(std::ostream& ostr) const + faces_set_mixin<0, D>::print(std::ostream& ostr) const { - const unsigned N = 0u; + const unsigned N = 0; ostr << "Faces of dimension " << N << " and their ajacent faces of dimension " << N + 1 << std::endl; @@ -793,9 +793,9 @@ namespace mln inline void - faces_set_mixin<0u, 0u>::print(std::ostream& ostr) const + faces_set_mixin<0, 0>::print(std::ostream& ostr) const { - const unsigned N = 0u; + const unsigned N = 0; ostr << "Faces of dimension " << N << std::endl; for (unsigned f = 0; f < faces_.size(); ++f) ostr << " " << f << std::endl; @@ -873,7 +873,7 @@ namespace mln template <typename BinaryFunction, typename T> inline T - faces_set_mixin<0u, D>::fold_left_(const BinaryFunction& f, + faces_set_mixin<0, D>::fold_left_(const BinaryFunction& f, const T& accu) const { return f(accu, faces_); @@ -882,7 +882,7 @@ namespace mln template <typename BinaryFunction, typename T> inline T - faces_set_mixin<0u, 0u>::fold_left_(const BinaryFunction& f, + faces_set_mixin<0, 0>::fold_left_(const BinaryFunction& f, const T& accu) const { return f(accu, faces_); @@ -943,7 +943,7 @@ namespace mln template <typename UnaryFunction> inline typename UnaryFunction::result_type - faces_set_mixin<0u, D>::apply_if_dim_matches_(unsigned n, + faces_set_mixin<0, D>::apply_if_dim_matches_(unsigned n, const UnaryFunction& f) const { // If we reached this method, then N should be 0. @@ -956,7 +956,7 @@ namespace mln template <typename UnaryFunction> inline typename UnaryFunction::result_type - faces_set_mixin<0u, 0u>::apply_if_dim_matches_(unsigned n, + faces_set_mixin<0, 0>::apply_if_dim_matches_(unsigned n, const UnaryFunction& f) const { // If we reached this method, then N should be 0. -- 1.5.6.5
participants (1)
-
Roland Levillain