* apps/statues/save_bin_alt.hh,
* mln/core/site_set/p_faces.hh,
* mln/io/off/save.hh,
* mln/topo/attic/faces_iter.hh,
* mln/topo/complex.hh,
* mln/topo/face_iter.hh,
* mln/topo/n_face.hh,
* mln/topo/static_n_face_iter.hh,
* tests/morpho/complex_image_wst.cc,
* tests/topo/complex.cc:
Here.
---
milena/ChangeLog | 16 ++++++++++++++++
milena/apps/statues/save_bin_alt.hh | 9 +++++----
milena/mln/core/site_set/p_faces.hh | 8 ++------
milena/mln/io/off/save.hh | 13 +++++++------
milena/mln/topo/attic/faces_iter.hh | 6 +++---
milena/mln/topo/complex.hh | 10 +++++-----
milena/mln/topo/face_iter.hh | 2 +-
milena/mln/topo/n_face.hh | 4 ++--
milena/mln/topo/static_n_face_iter.hh | 4 ++--
milena/tests/morpho/complex_image_wst.cc | 2 +-
milena/tests/topo/complex.cc | 9 ++++++---
11 files changed, 50 insertions(+), 33 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 915d95a..8e2cd90 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,21 @@
2009-06-05 Roland Levillain <roland(a)lrde.epita.fr>
+ Rename nfaces_with_dim<N>() as nfaces_of_static_dim<N>().
+
+ * apps/statues/save_bin_alt.hh,
+ * mln/core/site_set/p_faces.hh,
+ * mln/io/off/save.hh,
+ * mln/topo/attic/faces_iter.hh,
+ * mln/topo/complex.hh,
+ * mln/topo/face_iter.hh,
+ * mln/topo/n_face.hh,
+ * mln/topo/static_n_face_iter.hh,
+ * tests/morpho/complex_image_wst.cc,
+ * tests/topo/complex.cc:
+ Here.
+
+2009-06-05 Roland Levillain <roland(a)lrde.epita.fr>
+
Typo in the documentation of mln::topo::complex.
* mln/topo/complex.hh: Here.
diff --git a/milena/apps/statues/save_bin_alt.hh b/milena/apps/statues/save_bin_alt.hh
index 08b38e6..e422578 100644
--- a/milena/apps/statues/save_bin_alt.hh
+++ b/milena/apps/statues/save_bin_alt.hh
@@ -107,15 +107,16 @@ namespace mln
be safely ignored.'' */
/* FIXME: This is too long. We shall be able to write
- ima.domain().template nfaces_with_dim<0>()
+ ima.domain().template nfaces_of_static_dim<0>()
or even
- ima.template nfaces_with_dim<0>().
+ ima.template nfaces_of_static_dim<0>().
*/
- ostr << ima.domain().cplx().template nfaces_with_dim<0>() << '
'
+ ostr << ima.domain().cplx().template nfaces_of_static_dim<0>() <<
' '
<< n2faces << ' '
- << ima.domain().cplx().template nfaces_with_dim<1>() <<
std::endl;
+ << ima.domain().cplx().template nfaces_of_static_dim<1>()
+ << std::endl;
/*-------.
| Data. |
diff --git a/milena/mln/core/site_set/p_faces.hh b/milena/mln/core/site_set/p_faces.hh
index f9081d3..8e83f5c 100644
--- a/milena/mln/core/site_set/p_faces.hh
+++ b/milena/mln/core/site_set/p_faces.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008,2009 EPITA Research and Development Laboratory
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Milena Library. This library is free
@@ -127,10 +127,6 @@ namespace mln
/// Return The number of faces in the complex.
unsigned nfaces() const;
- // FIXME: Add nfaces(unsigned) routines? Yes, if this can
- // simplify (and lighten) the implementation of piters, psites,
- // etc.
-
// FIXME: This method is probably useless now.
/// Is this site set valid?
bool is_valid() const;
@@ -225,7 +221,7 @@ namespace mln
unsigned
p_faces<N, D, P>::nfaces() const
{
- return cplx_.template nfaces_with_dim<N>();
+ return cplx_.template nfaces_of_static_dim<N>();
}
template <unsigned N, unsigned D, typename P>
diff --git a/milena/mln/io/off/save.hh b/milena/mln/io/off/save.hh
index bd771db..a2f1d5d 100644
--- a/milena/mln/io/off/save.hh
+++ b/milena/mln/io/off/save.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -258,15 +258,16 @@ namespace mln
be safely ignored.'' */
/* FIXME: This is too long. We shall be able to write
- ima.domain().template nfaces_with_dim<0>()
+ ima.domain().template nfaces_of_static_dim<0>()
or even
- ima.template nfaces_with_dim<0>().
+ ima.template nfaces_of_static_dim<0>().
*/
- ostr << ima.domain().cplx().template nfaces_with_dim<0>() << '
'
- << ima.domain().cplx().template nfaces_with_dim<2>() << '
'
- << ima.domain().cplx().template nfaces_with_dim<1>() <<
std::endl;
+ ostr << ima.domain().cplx().template nfaces_of_static_dim<0>() <<
' '
+ << ima.domain().cplx().template nfaces_of_static_dim<2>() <<
' '
+ << ima.domain().cplx().template nfaces_of_static_dim<1>()
+ << std::endl;
/*-------.
| Data. |
diff --git a/milena/mln/topo/attic/faces_iter.hh b/milena/mln/topo/attic/faces_iter.hh
index d46b7ff..18905c9 100644
--- a/milena/mln/topo/attic/faces_iter.hh
+++ b/milena/mln/topo/attic/faces_iter.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -178,7 +178,7 @@ namespace mln
if (is_valid())
{
unsigned face_id = face_.face_id();
- if (face_id + 1 < face_.cplx().template nfaces_with_dim<N>())
+ if (face_id + 1 < face_.cplx().template nfaces_of_static_dim<N>())
/* FIXME: Provide accessor n_face::n() returning
a mutable reference? This way, we could just write
@@ -221,7 +221,7 @@ namespace mln
void
faces_bkd_iter_<N, D>::start()
{
- face_.set_face_id(face_.cplx().template nfaces_with_dim<N>() - 1);
+ face_.set_face_id(face_.cplx().template nfaces_of_static_dim<N>() - 1);
}
template <unsigned N, unsigned D>
diff --git a/milena/mln/topo/complex.hh b/milena/mln/topo/complex.hh
index 3a3e1f0..aa3af72 100644
--- a/milena/mln/topo/complex.hh
+++ b/milena/mln/topo/complex.hh
@@ -130,7 +130,7 @@ namespace mln
/// Return the number of \p N-faces.
template <unsigned N>
- unsigned nfaces_with_dim() const;
+ unsigned nfaces_of_static_dim() const;
/// \}
/// Dynamic manipulators.
@@ -484,7 +484,7 @@ namespace mln
/* 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_with_dim<0u>() - 1;
+ unsigned id = nfaces_of_static_dim<0u>() - 1;
return n_face<0u, D>(*this, id);
}
@@ -510,7 +510,7 @@ namespace mln
/* FIXME: This is not thread-proof (these two lines should
form an atomic section). */
data_->internal::faces_set_mixin<N + 1, D>::faces_.push_back(f);
- unsigned id = nfaces_with_dim<N + 1>() - 1;
+ unsigned id = nfaces_of_static_dim<N + 1>() - 1;
n_face<N + 1, D> fh(*this, id);
// Connect F and its ADJACENT_FACES.
@@ -538,7 +538,7 @@ namespace mln
/// add_size : x, c -> x + c.size()
/// \endcode
///
- /// \see mln::complex<D>::nfaces (static version).
+ /// \see mln::complex<D>::nfaces_of_static_dim<N> (static version).
/// \see mln::complex<D>::fold_left_.
struct add_size
{
@@ -587,7 +587,7 @@ namespace mln
template <unsigned N>
inline
unsigned
- complex<D>::nfaces_with_dim() const
+ complex<D>::nfaces_of_static_dim() const
{
return data_->internal::faces_set_mixin<N, D>::faces_.size();
}
diff --git a/milena/mln/topo/face_iter.hh b/milena/mln/topo/face_iter.hh
index 6a61f75..a1c5514 100644
--- a/milena/mln/topo/face_iter.hh
+++ b/milena/mln/topo/face_iter.hh
@@ -227,7 +227,7 @@ namespace mln
face_bkd_iter<D>::start()
{
f_.set_n(D);
- f_.set_face_id(f_.cplx().template nfaces_with_dim<D>() - 1);
+ f_.set_face_id(f_.cplx().template nfaces_of_static_dim<D>() - 1);
}
template <unsigned D>
diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh
index f92e91a..587f92a 100644
--- a/milena/mln/topo/n_face.hh
+++ b/milena/mln/topo/n_face.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -180,7 +180,7 @@ namespace mln
bool
n_face<N, D>::is_valid() const
{
- return face_id_ < cplx_.template nfaces_with_dim<N>();
+ return face_id_ < cplx_.template nfaces_of_static_dim<N>();
}
template <unsigned N, unsigned D>
diff --git a/milena/mln/topo/static_n_face_iter.hh
b/milena/mln/topo/static_n_face_iter.hh
index b8df78d..03dc04c 100644
--- a/milena/mln/topo/static_n_face_iter.hh
+++ b/milena/mln/topo/static_n_face_iter.hh
@@ -180,7 +180,7 @@ namespace mln
{
if (is_valid())
{
- if (f_.face_id() + 1 < f_.cplx().template nfaces_with_dim<N>())
+ if (f_.face_id() + 1 < f_.cplx().template nfaces_of_static_dim<N>())
f_.inc_face_id();
else
invalidate();
@@ -219,7 +219,7 @@ namespace mln
void
static_n_face_bkd_iter<N, D>::start()
{
- f_.set_face_id(f_.cplx().template nfaces_with_dim<N>() - 1);
+ f_.set_face_id(f_.cplx().template nfaces_of_static_dim<N>() - 1);
}
template <unsigned N, unsigned D>
diff --git a/milena/tests/morpho/complex_image_wst.cc
b/milena/tests/morpho/complex_image_wst.cc
index c9ebd33..c175001 100644
--- a/milena/tests/morpho/complex_image_wst.cc
+++ b/milena/tests/morpho/complex_image_wst.cc
@@ -236,7 +236,7 @@ int main()
We definitely need a complex_image that can accept a subset of a
complex as domain (or at least a p_face<N, D, P>. */
- wst_val_t actual_nbasins = nbasins - c.nfaces_with_dim<0>();
+ wst_val_t actual_nbasins = nbasins - c.nfaces_of_static_dim<0>();
std::cout << "nbasins = " << actual_nbasins << std::endl;
diff --git a/milena/tests/topo/complex.cc b/milena/tests/topo/complex.cc
index 65a9a71..fa6832d 100644
--- a/milena/tests/topo/complex.cc
+++ b/milena/tests/topo/complex.cc
@@ -101,9 +101,12 @@ int main()
std::cout
<< "Using ``static'' manipulators." << std::endl
- << " number of 0-faces: c.nfaces_with_dim<0>() = " <<
c.nfaces_with_dim<0>() << std::endl
- << " number of 1-faces: c.nfaces_with_dim<1>() = " <<
c.nfaces_with_dim<1>() << std::endl
- << " number of 2-faces: c.nfaces_with_dim<2>() = " <<
c.nfaces_with_dim<2>() << std::endl
+ << " number of 0-faces: c.nfaces_of_static_dim<0>() = "
+ << c.nfaces_of_static_dim<0>() << std::endl
+ << " number of 1-faces: c.nfaces_of_static_dim<1>() = "
+ << c.nfaces_of_static_dim<1>() << std::endl
+ << " number of 2-faces: c.nfaces_of_static_dim<2>() = "
+ << c.nfaces_of_static_dim<2>() << std::endl
<< " total number of faces: c.nfaces() = " << c.nfaces()
<< std::endl
<< std::endl;
--
1.6.1.2