26 #ifndef MLN_VALUE_INTERVAL_HH
27 # define MLN_VALUE_INTERVAL_HH
36 # include <mln/core/concept/object.hh>
48 struct interval_ :
public Object< interval_<T> >
50 interval_(
const T& from,
const T& to);
54 operator interval_<U>()
const;
60 interval(
const T& from,
const T& to);
63 # ifndef MLN_INCLUDE_ONLY
67 interval_<T>::interval_(
const T& from,
const T& to)
71 mln_precondition(from <= to);
77 interval_<T>::operator interval_<U>()
const
79 mln_invariant(from <= to);
80 interval_<U> tmp(from, to);
81 mln_postcondition(tmp.from <= tmp.to);
88 interval(
const T& from,
const T& to)
90 mln_precondition(from <= to);
91 interval_<T> tmp(from, to);
95 # endif // ! MLN_INCLUDE_ONLY
102 #endif // ! MLN_VALUE_INTERVAL_HH