26 #ifndef MLN_CORE_SITE_SET_P_MUTABLE_ARRAY_OF_HH
27 # define MLN_CORE_SITE_SET_P_MUTABLE_ARRAY_OF_HH
41 # include <mln/core/site_set/p_double.hh>
42 # include <mln/core/internal/site_set_base.hh>
43 # include <mln/util/array.hh>
51 template <
typename S>
class p_mutable_array_of;
58 struct site_set_< p_mutable_array_of<S> >
60 typedef trait::site_set::nsites::unknown
nsites;
61 typedef trait::site_set::bbox::unknown bbox;
62 typedef trait::site_set::contents::growing contents;
63 typedef trait::site_set::arity::multiple arity;
77 p_mutable_array_of<S> >,
78 private mlc_is_a(S, Site_Set)::check_t
89 typedef p_double_psite<self_, element>
psite;
92 typedef p_double_piter<
self_,
97 typedef p_double_piter<
self_,
142 bool is_empty_()
const;
154 template <
typename I>
155 const S& set_2_(
const I& it)
const;
165 template <
typename S>
166 std::ostream& operator<<(std::ostream& ostr, const p_mutable_array_of<S>& r);
171 # ifndef MLN_INCLUDE_ONLY
173 template <
typename S>
179 template <
typename S>
187 template <
typename S>
192 return p.index() < arr_.nelements() && arr_[p.index()].has(p.p());
195 template <
typename S>
203 template <
typename S>
208 mln_precondition(s.is_valid());
212 template <
typename S>
217 mln_precondition(i < arr_.nelements());
221 template <
typename S>
226 mln_precondition(i < arr_.nelements());
230 template <
typename S>
235 return arr_.nelements();
238 template <
typename S>
244 mln_postcondition(this->is_empty());
247 template <
typename S>
252 return arr_.is_empty();
255 template <
typename S>
260 return arr_.memory_size();
263 template <
typename S>
271 template <
typename S>
273 const util::array<S>&
274 p_mutable_array_of<S>::set_1_()
const
279 template <
typename S>
280 template <
typename I>
283 p_mutable_array_of<S>::set_2_(
const I& it)
const
289 template <
typename S>
290 std::ostream& operator<<(std::ostream& ostr, const p_mutable_array_of<S>& a)
292 return ostr << a.array_hook_();
295 # endif // ! MLN_INCLUDE_ONLY
300 #endif // ! MLN_CORE_SITE_SET_P_MUTABLE_ARRAY_OF_HH