https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix merging errors.
* mln/core/site_set/p_array.hh (bb_needs_update_): Remove.
* mln/core/site_set/p_if.hh (include): Fix missing dir.
* mln/core/image/safe.hh (operator()): Fix warning.
* mln/core/image/flat_image.hh (p): Fix warning.
* mln/fun/ops.hh: Fix double ctors.
* mln/algebra/h_vec.hh (namespace): Fix self incl.
* mln/algebra/vec.hh (namespace): Fix fwd decl.
Misc.
* doc/tutorial/examples/p_vaccess.cc,
* mln/core/site_set/p_priority.hh,
* mln/core/site_set/p_key.hh (eiter): Prefer using a macro.
doc/tutorial/examples/p_vaccess.cc | 2 +-
mln/algebra/h_vec.hh | 32 ++++++++++++++------------------
mln/algebra/vec.hh | 4 ++--
mln/core/image/flat_image.hh | 4 ++--
mln/core/image/safe.hh | 2 +-
mln/core/site_set/p_array.hh | 4 +---
mln/core/site_set/p_if.hh | 2 +-
mln/core/site_set/p_key.hh | 2 +-
mln/core/site_set/p_priority.hh | 13 ++++++++-----
mln/fun/ops.hh | 8 --------
10 files changed, 31 insertions(+), 42 deletions(-)
Index: doc/tutorial/examples/p_vaccess.cc
--- doc/tutorial/examples/p_vaccess.cc (revision 2180)
+++ doc/tutorial/examples/p_vaccess.cc (working copy)
@@ -100,7 +100,7 @@
for (unsigned l = 0; l <= nlabels; ++l)
{
std::cout << "arr(" << l << ") = ";
- mln_iter_(util::set<p_run2d>) r(arr(l).set_hook_());
+ util::set<p_run2d>::eiter r(arr(l).set_hook_());
for_all(r)
std::cout << r << ' ';
std::cout << std::endl;
Index: mln/core/site_set/p_array.hh
--- mln/core/site_set/p_array.hh (revision 2180)
+++ mln/core/site_set/p_array.hh (working copy)
@@ -324,15 +324,13 @@
template <typename P>
inline
p_array<P>::p_array()
- : bb_needs_update_(false)
{
}
template <typename P>
inline
p_array<P>::p_array(const std::vector<P>& vect)
- : vect_(vect),
- bb_needs_update_(true)
+ : vect_(vect)
{
}
Index: mln/core/site_set/p_priority.hh
--- mln/core/site_set/p_priority.hh (revision 2180)
+++ mln/core/site_set/p_priority.hh (working copy)
@@ -75,7 +75,6 @@
p_priority<P,Q> >
{
typedef p_priority<P,Q> self_;
- typedef util::set<P> set_;
public:
/// Element associated type.
@@ -86,10 +85,14 @@
typedef p_double_psite<self_, Q> psite;
/// Forward Site_Iterator associated type.
- typedef p_double_piter<self_, typename set_::bkd_iter, mln_fwd_piter(Q)>
fwd_piter;
+ typedef p_double_piter< self_,
+ mln_bkd_eiter(util::set<P>),
+ mln_fwd_piter(Q) > fwd_piter;
/// Backward Site_Iterator associated type.
- typedef p_double_piter<self_, typename set_::fwd_iter, mln_bkd_piter(Q)>
bkd_piter;
+ typedef p_double_piter< self_,
+ mln_fwd_eiter(util::set<P>),
+ mln_bkd_piter(Q) > bkd_piter;
/// Site_Iterator associated type.
typedef fwd_piter piter;
@@ -387,7 +390,7 @@
// Containers p_ and q_ are not consistent in size!
return false;
- typename util::set<P>::iter p(p_);
+ mln_eiter(util::set<P>) p(p_);
for_all(p)
if (q_.find(p) == q_.end())
// We have an empty queue (with priority p)!
@@ -409,7 +412,7 @@
std::ostream& operator<<(std::ostream& ostr, const
p_priority<P,Q>& pq)
{
ostr << '{';
- typename util::set<P>::bkd_iter p(pq.priorities());
+ mln_bkd_eiter(util::set<P>) p(pq.priorities());
for_all(p)
{
ostr << ' ' << p << ':';
Index: mln/core/site_set/p_key.hh
--- mln/core/site_set/p_key.hh (revision 2180)
+++ mln/core/site_set/p_key.hh (working copy)
@@ -634,7 +634,7 @@
std::ostream& operator<<(std::ostream& ostr, const p_key<K,P>&
pk)
{
ostr << '{';
- typename util::set<K>::fwd_iter k(pk.keys());
+ mln_fwd_eiter(util::set<K>) k(pk.keys());
for_all(k)
{
ostr << ' ' << k << ':';
Index: mln/core/site_set/p_if.hh
--- mln/core/site_set/p_if.hh (revision 2180)
+++ mln/core/site_set/p_if.hh (working copy)
@@ -221,7 +221,7 @@
-# include <mln/core/p_if_piter.hh>
+# include <mln/core/site_set/p_if_piter.hh>
Index: mln/core/image/safe.hh
--- mln/core/image/safe.hh (revision 2180)
+++ mln/core/image/safe.hh (working copy)
@@ -165,7 +165,7 @@
template <typename I>
inline
- typename safe_image<I>::lvalue
+ mln_morpher_lvalue(I)
safe_image<I>::operator()(const mln_psite(I)& p)
{
mln_precondition(this->has_data());
Index: mln/core/image/flat_image.hh
--- mln/core/image/flat_image.hh (revision 2180)
+++ mln/core/image/flat_image.hh (working copy)
@@ -233,7 +233,7 @@
template <typename T, typename S>
inline
const T&
- flat_image<T,S>::operator()(const mln_psite(S)& p) const
+ flat_image<T,S>::operator()(const mln_psite(S)&) const
{
mln_precondition(this->has_data());
return this->data_->val_;
@@ -242,7 +242,7 @@
template <typename T, typename S>
inline
const T&
- flat_image<T,S>::operator()(const mln_psite(S)& p)
+ flat_image<T,S>::operator()(const mln_psite(S)&)
{
mln_precondition(this->has_data());
return this->data_->val_;
Index: mln/fun/ops.hh
--- mln/fun/ops.hh (revision 2180)
+++ mln/fun/ops.hh (working copy)
@@ -60,10 +60,6 @@
{ \
} \
\
- Name##_##Out##_expr_() \
- { \
- } \
- \
template <typename P> \
result operator()(const P& p) const \
{ \
@@ -120,10 +116,6 @@
{ \
} \
\
- Name##_##Out##_expr_() \
- { \
- } \
- \
template <typename P> \
result operator()(const P& p) const \
{ \
Index: mln/algebra/h_vec.hh
--- mln/algebra/h_vec.hh (revision 2180)
+++ mln/algebra/h_vec.hh (working copy)
@@ -141,24 +141,6 @@
return *this;
}
- namespace algebra
- {
-
- // Immersion of a vector in its homogeneous space.
- template <unsigned n, typename T>
- inline
- h_vec<n, T> vec<n,T>::to_h_vec() const
- {
- h_vec<n, T> tmp;
- for (unsigned i = 0; i < n; ++i)
- tmp[i] = this->data_[i];
- tmp[n] = literal::one;
- return tmp;
- }
-
- } // end of namespace mln::algebra
-
-
template <unsigned d, typename C>
inline
vec<d,C> h_vec<d,C>::to_vec() const
@@ -172,6 +154,20 @@
return tmp;
}
+ // Immersion of a vector in its homogeneous space.
+
+ template <unsigned n, typename T>
+ inline
+ h_vec<n, T>
+ vec<n,T>::to_h_vec() const
+ {
+ h_vec<n, T> tmp;
+ for (unsigned i = 0; i < n; ++i)
+ tmp[i] = this->data_[i];
+ tmp[n] = literal::one;
+ return tmp;
+ }
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::algebra
Index: mln/algebra/vec.hh
--- mln/algebra/vec.hh (revision 2180)
+++ mln/algebra/vec.hh (working copy)
@@ -53,14 +53,14 @@
namespace mln
{
- // Fwd decls.
+ // Forward declarations.
namespace algebra {
template <unsigned n, typename T> class vec;
+ template <unsigned d, typename C> struct h_vec;
}
namespace literal {
struct zero_t;
}
- template <unsigned d, typename C> struct h_vec;