27 #ifndef MLN_CORE_INTERNAL_WEIGHTED_WINDOW_BASE_HH
28 # define MLN_CORE_INTERNAL_WEIGHTED_WINDOW_BASE_HH
34 # include <mln/core/concept/weighted_window.hh>
49 template <
typename W,
typename E>
70 unsigned size() const;
80 unsigned delta() const;
85 const mln_dpsite(W)&
dp(
unsigned i) const;
90 bool has(const mln_dpsite(W)&
dp) const;
100 # ifndef MLN_INCLUDE_ONLY
102 template <
typename W,
typename E>
108 template <
typename W,
typename E>
113 return exact(
this)->win().is_empty();
116 template <
typename W,
typename E>
121 mlc_equal(mln_trait_window_size(W),
122 trait::window::size::fixed)::check();
123 return exact(
this)->win().size();
126 template <
typename W,
typename E>
131 mlc_equal(mln_trait_window_support(W),
132 trait::window::support::regular)::check();
133 mlc_not_equal(mln_trait_window_definition(W),
134 trait::window::definition::varying)::check();
135 return exact(
this)->win().is_centered();
138 template <
typename W,
typename E>
143 mlc_equal(mln_trait_window_support(W),
144 trait::window::support::regular)::check();
145 mlc_not_equal(mln_trait_window_definition(W),
146 trait::window::definition::varying)::check();
147 return exact(
this)->win().delta();
150 template <
typename W,
typename E>
155 mlc_equal(mln_trait_window_support(W),
156 trait::window::support::regular)::check();
157 mlc_equal(mln_trait_window_definition(W),
158 trait::window::definition::unique)::check();
159 mln_precondition(i < this->
size());
160 return exact(
this)->win().dp(i);
163 template <
typename W,
typename E>
168 mlc_equal(mln_trait_window_support(W),
169 trait::window::support::regular)::check();
170 mlc_equal(mln_trait_window_definition(W),
171 trait::window::definition::unique)::check();
172 return exact(
this)->win().has(dp);
175 template <
typename W,
typename E>
183 # endif // ! MLN_INCLUDE_ONLY
190 #endif // ! MLN_CORE_INTERNAL_WEIGHTED_WINDOW_BASE_HH