Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

mln::complex_image< D, G, V > Class Template Reference
[Basic types]

Image based on a complex. More...

#include <complex_image.hh>

Inheritance diagram for mln::complex_image< D, G, V >:
Inheritance graph

List of all members.

Public Types

typedef p_complex< D, G >
::bkd_piter 
bkd_piter
 Backward Site_Iterator associated type.
typedef Image< void > category
typedef p_complex< D, G > domain_t
 Site_Set associated type.
typedef complex_image< D, G, V > exact_t
typedef p_complex< D, G >
::fwd_piter 
fwd_piter
 Forward Site_Iterator associated type.
typedef G geom
 The geometry type of the complex.
typedef V & lvalue
 Return type of read-write access.
typedef fwd_piter piter
 Site_Iterator associated type; default definition is fwd_piter.
typedef p_complex< D, G >::psite psite
 Point_Site associated type.
typedef const V & rvalue
 Return type of read-only access.
typedef p_complex< D, G >::site site
 Site associated type.
typedef complex_image< D,
tag::psite_< G >, tag::value_
< V > > 
skeleton
 Skeleton.
typedef mln::value::set< V > t_eligible_values_set
 Eligible-value-set associated type.
typedef mln::value::set
< typename
mln::value::super_value< V >
::ret
t_values_space
 Value space associated type.
typedef V value
 Value associated type.

Public Member Functions

void destroy ()
 Detach data from an image (free it if nobody else hold it).
bool has (const psite &p) const
 Test if p belongs to the image domain.
const util::tracked_ptr
< internal::data
< complex_image< D, G, V > > > & 
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 p_complex< D, G > &pc, const metal::vec< D+1, std::vector< V > > &values)
 Initialize an empty image.
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.
lvalue operator() (const complex_psite< D, G > &p)
 Read-write access of face value at point site p.
rvalue operator() (const complex_psite< D, G > &p) const
 Read-only access of face value at point site p.
const t_eligible_values_setvalues_eligible () const
const t_values_spacevalues_space () const
 Return the value space of the image.

 complex_image ()
 Constructors.
 complex_image (const p_complex< D, G > &pc)
 complex_image (const p_complex< D, G > &pc, const metal::vec< D+1, std::vector< V > > &values)

const p_complex< D, G > & domain () const
 Accessors.
const metal::vec< D+1,
std::vector< mlc_unbool(V) > > & 
values () const
 Return the array of values associated to the faces.

Static Public Attributes

static const unsigned dim = D
 The dimension of the complex.

Protected Attributes

util::tracked_ptr
< internal::data
< complex_image< D, G, V > > > 
data_

Detailed Description

template<unsigned D, typename G, typename V>
class mln::complex_image< D, G, V >

Image based on a complex.

Values attached to each face of the complex.

Template Parameters:
D The dimension of the complex.
G The geometry type of the complex.
V The value type of the image.

Definition at line 164 of file mln/core/image/complex_image.hh.


Member Typedef Documentation

typedef p_complex< D, G > ::bkd_piter mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::bkd_piter [inherited]

Backward Site_Iterator associated type.

Definition at line 118 of file core/internal/image_base.hh.

typedef Image<void> mln::Image< complex_image< D, G, V > >::category [inherited]

Reimplemented from mln::Object< complex_image< D, G, V > >.

Definition at line 75 of file core/concept/image.hh.

typedef p_complex< D, G > mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::domain_t [inherited]

Site_Set associated type.

Definition at line 105 of file core/internal/image_base.hh.

typedef complex_image< D, G, V > mln::Object< complex_image< D, G, V > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef p_complex< D, G > ::fwd_piter mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::fwd_piter [inherited]

Forward Site_Iterator associated type.

Definition at line 115 of file core/internal/image_base.hh.

template<unsigned D, typename G, typename V>
typedef G mln::complex_image< D, G, V >::geom

The geometry type of the complex.

Definition at line 172 of file mln/core/image/complex_image.hh.

template<unsigned D, typename G, typename V>
typedef V& mln::complex_image< D, G, V >::lvalue

Return type of read-write access.

Definition at line 177 of file mln/core/image/complex_image.hh.

typedef fwd_piter mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::piter [inherited]

Site_Iterator associated type; default definition is fwd_piter.

Definition at line 123 of file core/internal/image_base.hh.

typedef p_complex< D, G > ::psite mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::psite [inherited]

Point_Site associated type.

Definition at line 108 of file core/internal/image_base.hh.

template<unsigned D, typename G, typename V>
typedef const V& mln::complex_image< D, G, V >::rvalue

Return type of read-only access.

Definition at line 180 of file mln/core/image/complex_image.hh.

typedef p_complex< D, G > ::site mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::site [inherited]

Site associated type.

Definition at line 111 of file core/internal/image_base.hh.

template<unsigned D, typename G, typename V>
typedef complex_image< D, tag::psite_<G>, tag::value_<V> > mln::complex_image< D, G, V >::skeleton

Skeleton.

Definition at line 183 of file mln/core/image/complex_image.hh.

typedef mln::value::set<V > mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::t_eligible_values_set [inherited]

Eligible-value-set associated type.

Definition at line 91 of file core/internal/image_base.hh.

typedef mln::value::set< typename mln::value::super_value<V >::ret > mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::t_values_space [inherited]

Value space associated type.

Definition at line 98 of file core/internal/image_base.hh.

template<unsigned D, typename G, typename V>
typedef V mln::complex_image< D, G, V >::value

Constructor & Destructor Documentation

template<unsigned D, typename G , typename V >
mln::complex_image< D, G, V >::complex_image (  )  [inline]

Constructors.

Definition at line 276 of file mln/core/image/complex_image.hh.

template<unsigned D, typename G, typename V >
mln::complex_image< D, G, V >::complex_image ( const p_complex< D, G > &  pc  )  [inline]
template<unsigned D, typename G, typename V>
mln::complex_image< D, G, V >::complex_image ( const p_complex< D, G > &  pc,
const metal::vec< D+1, std::vector< V > > &  values 
) [inline]

Member Function Documentation

void mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::destroy (  )  [inherited]

Detach data from an image (free it if nobody else hold it).

template<unsigned D, typename G , typename V >
const p_complex< D, G > & mln::complex_image< D, G, V >::domain (  )  const [inline]
bool mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::has ( const psite p  )  const [inherited]

Test if p belongs to the image domain.

Referenced by mln::make::attachment(), and mln::make::detachment().

const util::tracked_ptr< internal::data<complex_image< D, G, V > > >& mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::hook_data_ (  )  const [inherited]

Hook to the image data.

const void* mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::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_< complex_image< D, G, V > , mln::metal::equal< mln_trait_image_speed(complex_image< D, G, V >), trait::image::speed::fastest >::eval >::index_of_point ( const P &  p  )  const [inherited]

Give the offset of the site p.

Parameters:
[in] p A site.
Warning:
This method is final.
Precondition:
The image has to be initialized and to own the point p.
Postcondition:
p == point_at_index(result)
template<unsigned D, typename G, typename V>
void mln::complex_image< D, G, V >::init_ ( const p_complex< D, G > &  pc,
const metal::vec< D+1, std::vector< V > > &  values 
) [inline]
bool mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::is_valid (  )  const [inherited]

Test if this image has been initialized; default impl.

Referenced by mln::complex_image< D, G, V >::domain(), and mln::complex_image< D, G, V >::init_().

std::size_t mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::nsites (  )  const [inherited]

Give the number of sites of the image domain.

template<unsigned D, typename G, typename V >
complex_image< D, G, V >::rvalue mln::complex_image< D, G, V >::operator() ( const complex_psite< D, G > &  p  )  const [inline]
template<unsigned D, typename G, typename V >
complex_image< D, G, V >::lvalue mln::complex_image< D, G, V >::operator() ( const complex_psite< D, G > &  p  )  [inline]
template<unsigned D, typename G , typename V >
const metal::vec< D+1, std::vector< mlc_unbool(V) > > & mln::complex_image< D, G, V >::values (  )  const [inline]

Return the array of values associated to the faces.

Definition at line 335 of file mln/core/image/complex_image.hh.

References mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::data_.

Referenced by mln::complex_image< D, G, V >::complex_image().

const t_eligible_values_set& mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::values_eligible (  )  const [inherited]
const t_values_space& mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::values_space (  )  const [inherited]

Return the value space of the image.


Member Data Documentation

util::tracked_ptr< internal::data<complex_image< D, G, V > > > mln::internal::image_base< V , p_complex< D, G > , complex_image< D, G, V > >::data_ [protected, inherited]
template<unsigned D, typename G, typename V>
const unsigned mln::complex_image< D, G, V >::dim = D [static]

The dimension of the complex.

Definition at line 170 of file mln/core/image/complex_image.hh.