* apps/graph-morpho/morpho.hh (combine): Here.
---
milena/ChangeLog | 6 ++++++
milena/apps/graph-morpho/morpho.hh | 20 ++++++--------------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b1c3939..ba395d1 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2009-09-21 Roland Levillain <roland(a)lrde.epita.fr>
+ Have combine delegate to impl::combine.
+
+ * apps/graph-morpho/morpho.hh (combine): Here.
+
+2009-09-21 Roland Levillain <roland(a)lrde.epita.fr>
+
Add impl::combine for mln::image2d<T>.
* apps/graph-morpho/cplx2d.hh: New symlink to...
diff --git a/milena/apps/graph-morpho/morpho.hh b/milena/apps/graph-morpho/morpho.hh
index 70d19b1..718323c 100644
--- a/milena/apps/graph-morpho/morpho.hh
+++ b/milena/apps/graph-morpho/morpho.hh
@@ -107,26 +107,18 @@ namespace impl
}
}
+// -------- //
+// Facade. //
+// -------- //
+
/// Combine the vertices and the edges of two images to create a new
/// graph image (``operator'' \f$\ovee\f$).
template <typename I>
inline
mln_concrete(I)
-combine(const mln::Image<I>& vertices_, const mln::Image<I>& edges_)
+combine(const mln::Image<I>& vertices, const mln::Image<I>& edges)
{
- const I vertices = mln::exact(vertices_);
- const I edges = mln::exact(edges_);
- mln_precondition(vertices.domain() == edges.domain());
-
- mln_concrete(I) output;
- mln::initialize(output, vertices);
- mln::p_n_faces_fwd_piter<I::dim, mln_geom(I)> v(output.domain(), 0);
- for_all(v)
- output(v) = vertices(v);
- mln::p_n_faces_fwd_piter<I::dim, mln_geom(I)> e(output.domain(), 1);
- for_all(e)
- output(e) = edges(e);
- return output;
+ return impl::combine(mln::exact(vertices), mln::exact(edges));
}
--
1.6.4.2