URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-22 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Subdirectory logical ready for rereading.
* mln/logical/all.hh,
* mln/logical/and.hh,
* mln/logical/and_not.hh,
* mln/logical/not.hh,
* mln/logical/or.hh: Check typo.
---
all.hh | 8 +++++++-
and.hh | 3 +++
and_not.hh | 1 +
not.hh | 6 ++++++
or.hh | 4 ++++
5 files changed, 21 insertions(+), 1 deletion(-)
Index: trunk/milena/mln/logical/and.hh
===================================================================
--- trunk/milena/mln/logical/and.hh (revision 1514)
+++ trunk/milena/mln/logical/and.hh (revision 1515)
@@ -37,6 +37,7 @@
# include <mln/core/concept/image.hh>
+
// Specializations are in:
# include <mln/logical/and.spe.hh>
@@ -105,6 +106,7 @@
mln_concrete(L) and_(const Image<L>& lhs, const Image<R>& rhs)
{
trace::entering("logical::and_");
+
mln_precondition(exact(rhs).domain() == exact(lhs).domain());
mln_concrete(L) output;
@@ -120,6 +122,7 @@
void and_inplace(Image<L>& lhs, const Image<R>& rhs)
{
trace::entering("logical::and_inplace");
+
mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
impl::and__(mln_trait_image_speed(L)(), exact(lhs),
Index: trunk/milena/mln/logical/and_not.hh
===================================================================
--- trunk/milena/mln/logical/and_not.hh (revision 1514)
+++ trunk/milena/mln/logical/and_not.hh (revision 1515)
@@ -37,6 +37,7 @@
# include <mln/core/concept/image.hh>
+
// Specializations are in:
# include <mln/logical/and_not.spe.hh>
Index: trunk/milena/mln/logical/all.hh
===================================================================
--- trunk/milena/mln/logical/all.hh (revision 1514)
+++ trunk/milena/mln/logical/all.hh (revision 1515)
@@ -41,7 +41,13 @@
namespace logical
{
/// Implementation namespace of logical namespace.
- namespace impl {}
+ namespace impl {
+
+ /// Generic implementation namespace of logical namespace.
+ namespace generic {}
+
+ }
+
}
}
Index: trunk/milena/mln/logical/or.hh
===================================================================
--- trunk/milena/mln/logical/or.hh (revision 1514)
+++ trunk/milena/mln/logical/or.hh (revision 1515)
@@ -37,9 +37,11 @@
# include <mln/core/concept/image.hh>
+
// Specializations are in:
# include <mln/logical/or.spe.hh>
+
namespace mln
{
@@ -102,6 +104,7 @@
mln_concrete(L) or_(const Image<L>& lhs, const Image<R>& rhs)
{
trace::entering("logical::or_");
+
mln_precondition(exact(rhs).domain() == exact(lhs).domain());
mln_concrete(L) output;
@@ -117,6 +120,7 @@
void or_inplace(Image<L>& lhs, const Image<R>& rhs)
{
trace::entering("logical::or_inplace");
+
mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
impl::or__(mln_trait_image_speed(L)(), exact(lhs),
Index: trunk/milena/mln/logical/not.hh
===================================================================
--- trunk/milena/mln/logical/not.hh (revision 1514)
+++ trunk/milena/mln/logical/not.hh (revision 1515)
@@ -37,6 +37,7 @@
# include <mln/core/concept/image.hh>
+
// Specializations are in:
# include <mln/logical/not.spe.hh>
@@ -65,6 +66,8 @@
* It performs: \n
* for all p of input.domain \n
* input(p) = not input(p)
+ *
+ * \pre \p input.has_data
*/
template <typename I>
void not_inplace(Image<I>& input);
@@ -99,6 +102,7 @@
mln_concrete(I) not_(const Image<I>& input)
{
trace::entering("logical::not");
+
mln_precondition(exact(input).has_data());
mln_concrete(I) output;
@@ -113,8 +117,10 @@
void not_inplace(Image<I>& input)
{
trace::entering("logical::not_inplace");
+
mln_precondition(exact(input).has_data());
impl::not__(mln_trait_image_speed(I)(), exact(input), exact(input));
+
trace::exiting("logical::not_inplace");
}