27 #ifndef MLN_CORE_INTERNAL_RUN_IMAGE_HH
28 # define MLN_CORE_INTERNAL_RUN_IMAGE_HH
35 # include <mln/core/internal/image_primary.hh>
36 # include <mln/core/site_set/p_run.hh>
37 # include <mln/core/site_set/p_set_of.hh>
52 template <
typename T,
typename P,
typename E>
92 # ifndef MLN_INCLUDE_ONLY
94 template <
typename T,
typename P,
typename E>
100 template <
typename T,
typename P,
typename E>
105 return float(
exact(
this)->data_->memory_size()) /
106 float (
sizeof(
T) *
exact(
this)->data_->domain_.bbox().nsites());
109 template <
typename T,
typename P,
typename E>
114 exact(
this)->data_->finalize();
117 template <
typename T,
typename P,
typename E>
122 const E* ima =
exact(
this);
123 mln_precondition(ps.index() < ima->data_->domain_.nsites());
124 mln_precondition(ps.p().index() < ima->data_->domain_[ps.index()].length());
125 return ima->data_->domain_[ps.index()][ps.p().index()];
128 template <
typename T,
typename P,
typename E>
133 const E* ima =
exact(
this);
134 if (!ima->is_valid())
137 return (ps.index() < ima->data_->domain_.nsites()
138 && ps.p().index() < ima->data_->domain_[ps.index()].length()
139 && ima->data_->domain_[ps.index()][ps.p().index()] == ps);
142 # endif // ! MLN_INCLUDE_ONLY
149 #endif // ! MLN_CORE_INTERNAL_RUN_IMAGE_HH