Image with a single value. More...
#include <flat_image.hh>
Public Types | |
typedef S::bkd_piter | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Image< void > | category |
typedef S | domain_t |
Site_Set associated type. | |
typedef flat_image< T, S > | exact_t |
typedef S::fwd_piter | fwd_piter |
Forward Site_Iterator associated type. | |
typedef T & | lvalue |
Return type of read-write access. | |
typedef fwd_piter | piter |
Site_Iterator associated type; default definition is fwd_piter. | |
typedef S::psite | psite |
Point_Site associated type. | |
typedef const T & | rvalue |
Return type of read-only access. | |
typedef S::site | site |
Site associated type. | |
typedef flat_image < tag::value_< T > , tag::domain_< S > > | skeleton |
Skeleton. | |
typedef mln::value::set< T > | t_eligible_values_set |
Eligible-value-set associated type. | |
typedef mln::value::set < typename mln::value::super_value< T > ::ret > | t_values_space |
Value space associated type. | |
typedef T | value |
Value associated type. | |
Public Member Functions | |
void | destroy () |
Detach data from an image (free it if nobody else hold it). | |
const S & | domain () const |
Give the definition domain. | |
flat_image () | |
Constructor without argument. | |
flat_image (const T &val, const S &pset) | |
Constructor. | |
bool | has (const typename S::psite &p) const |
Test if p is valid: always return true. | |
bool | has (const psite &p) const |
Test if p belongs to the image domain. | |
const util::tracked_ptr < internal::data< flat_image < T, S > > > & | hook_data_ () const |
Hook to the image data. | |
const void * | id_ () const |
Give an identifier of this image. | |
unsigned | index_of_point (const P &p) const |
Give the offset of the site p . | |
void | init_ (const T &val, const S &pset) |
Initialization. | |
bool | is_valid () const |
Test if this image has been initialized; default impl. | |
std::size_t | nsites () const |
Give the number of sites of the image domain. | |
T & | operator() (const typename S::psite &p) |
Read-write access to the image value located at point p . | |
const T & | operator() (const typename S::psite &p) const |
Read-only access to the image value located at point p . | |
const T & | value_ () const |
Specific methods. | |
T & | value_ () |
const t_eligible_values_set & | values_eligible () const |
const t_values_space & | values_space () const |
Return the value space of the image. | |
Protected Attributes | |
util::tracked_ptr < internal::data< flat_image < T, S > > > | data_ |
Image with a single value.
typedef S ::bkd_piter mln::internal::image_base< T, S, flat_image< T, S > >::bkd_piter [inherited] |
Backward Site_Iterator associated type.
typedef Image<void> mln::Image< flat_image< T, S > >::category [inherited] |
Reimplemented from mln::Object< flat_image< T, S > >.
typedef S mln::internal::image_base< T, S, flat_image< T, S > >::domain_t [inherited] |
Site_Set associated type.
typedef flat_image< T, S > mln::Object< flat_image< T, S > >::exact_t [inherited] |
typedef S ::fwd_piter mln::internal::image_base< T, S, flat_image< T, S > >::fwd_piter [inherited] |
Forward Site_Iterator associated type.
typedef T& mln::flat_image< T, S >::lvalue |
Return type of read-write access.
typedef fwd_piter mln::internal::image_base< T, S, flat_image< T, S > >::piter [inherited] |
Site_Iterator associated type; default definition is fwd_piter.
typedef S ::psite mln::internal::image_base< T, S, flat_image< T, S > >::psite [inherited] |
Point_Site associated type.
typedef const T& mln::flat_image< T, S >::rvalue |
Return type of read-only access.
typedef S ::site mln::internal::image_base< T, S, flat_image< T, S > >::site [inherited] |
Site associated type.
typedef flat_image< tag::value_<T>, tag::domain_<S> > mln::flat_image< T, S >::skeleton |
Skeleton.
typedef mln::value::set<T> mln::internal::image_base< T, S, flat_image< T, S > >::t_eligible_values_set [inherited] |
Eligible-value-set associated type.
typedef mln::value::set< typename mln::value::super_value<T>::ret > mln::internal::image_base< T, S, flat_image< T, S > >::t_values_space [inherited] |
Value space associated type.
typedef T mln::flat_image< T, S >::value |
Value associated type.
Reimplemented from mln::internal::image_base< T, S, flat_image< T, S > >.
mln::flat_image< T, S >::flat_image | ( | ) | [inline] |
Constructor without argument.
mln::flat_image< T, S >::flat_image | ( | const T & | val, | |
const S & | pset | |||
) | [inline] |
Constructor.
References mln::flat_image< T, S >::init_().
void mln::internal::image_base< T, S, flat_image< T, S > >::destroy | ( | ) | [inherited] |
Detach data from an image (free it if nobody else hold it).
const S & mln::flat_image< T, S >::domain | ( | ) | const [inline] |
Give the definition domain.
References mln::internal::image_base< T, S, flat_image< T, S > >::data_.
bool mln::internal::image_base< T, S, flat_image< T, S > >::has | ( | const psite & | p | ) | const [inherited] |
Test if p
belongs to the image domain.
bool mln::flat_image< T, S >::has | ( | const typename S::psite & | p | ) | const [inline] |
Test if p
is valid: always return true.
const util::tracked_ptr< internal::data<flat_image< T, S > > >& mln::internal::image_base< T, S, flat_image< T, S > >::hook_data_ | ( | ) | const [inherited] |
Hook to the image data.
const void* mln::internal::image_base< T, S, flat_image< T, S > >::id_ | ( | ) | const [inherited] |
Give an identifier of this image.
When several image variables designate the same image, they share the same identifier.
unsigned mln::internal::check::image_fastest_< flat_image< T, S > , mln::metal::equal< mln_trait_image_speed(flat_image< T, S >), trait::image::speed::fastest >::eval >::index_of_point | ( | const P & | p | ) | const [inherited] |
Give the offset of the site p
.
[in] | p | A site. |
p
. void mln::flat_image< T, S >::init_ | ( | const T & | val, | |
const S & | pset | |||
) | [inline] |
Initialization.
References mln::internal::image_base< T, S, flat_image< T, S > >::data_, and mln::internal::image_base< T, S, flat_image< T, S > >::is_valid().
Referenced by mln::flat_image< T, S >::flat_image(), and mln::init_().
bool mln::internal::image_base< T, S, flat_image< T, S > >::is_valid | ( | ) | const [inherited] |
Test if this image has been initialized; default impl.
Referenced by mln::flat_image< T, S >::init_(), mln::flat_image< T, S >::operator()(), and mln::flat_image< T, S >::value_().
std::size_t mln::internal::image_base< T, S, flat_image< T, S > >::nsites | ( | ) | const [inherited] |
Give the number of sites of the image domain.
const T & mln::flat_image< T, S >::operator() | ( | const typename S::psite & | p | ) | const [inline] |
Read-only access to the image value located at point p
.
References mln::internal::image_base< T, S, flat_image< T, S > >::data_, and mln::internal::image_base< T, S, flat_image< T, S > >::is_valid().
T & mln::flat_image< T, S >::operator() | ( | const typename S::psite & | p | ) | [inline] |
Read-write access to the image value located at point p
.
References mln::internal::image_base< T, S, flat_image< T, S > >::data_, and mln::internal::image_base< T, S, flat_image< T, S > >::is_valid().
T & mln::flat_image< T, S >::value_ | ( | ) | [inline] |
const T & mln::flat_image< T, S >::value_ | ( | ) | const [inline] |
Specific methods.
References mln::internal::image_base< T, S, flat_image< T, S > >::data_, and mln::internal::image_base< T, S, flat_image< T, S > >::is_valid().
const t_eligible_values_set& mln::internal::image_base< T, S, flat_image< T, S > >::values_eligible | ( | ) | const [inherited] |
const t_values_space& mln::internal::image_base< T, S, flat_image< T, S > >::values_space | ( | ) | const [inherited] |
Return the value space of the image.
util::tracked_ptr< internal::data<flat_image< T, S > > > mln::internal::image_base< T, S, flat_image< T, S > >::data_ [protected, inherited] |