Image based on a complex. More...
#include <complex_image.hh>
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 std::vector< V >::reference | 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 std::vector< V > ::const_reference | 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_set & | values_eligible () const |
const t_values_space & | values_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< 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_ |
Image based on a complex.
Values attached to each face of the complex.
D | The dimension of the complex. | |
G | The geometry type of the complex. | |
V | The value type of the image. |
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.
typedef Image<void> mln::Image< complex_image< D, G, V > >::category [inherited] |
Reimplemented from mln::Object< complex_image< D, G, V > >.
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.
typedef complex_image< D, G, V > mln::Object< complex_image< D, G, V > >::exact_t [inherited] |
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.
typedef G mln::complex_image< D, G, V >::geom |
The geometry type of the complex.
typedef std::vector<V>::reference mln::complex_image< D, G, V >::lvalue |
Return type of read-write access.
We use the associated type reference
instead of a plain reference on the value type (V
), because it's the only way to safely form a reference on the element in the case of a std::vector<bool>.
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.
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.
typedef std::vector<V>::const_reference mln::complex_image< D, G, V >::rvalue |
Return type of read-only access.
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.
typedef complex_image< D, tag::psite_<G>, tag::value_<V> > mln::complex_image< D, G, V >::skeleton |
Skeleton.
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.
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.
typedef V mln::complex_image< D, G, V >::value |
Value associated type.
Reimplemented from mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >.
mln::complex_image< D, G, V >::complex_image | ( | ) | [inline] |
Constructors.
mln::complex_image< D, G, V >::complex_image | ( | const p_complex< D, G > & | pc | ) | [inline] |
References mln::p_complex< D, G >::cplx(), and mln::complex_image< D, G, V >::init_().
mln::complex_image< D, G, V >::complex_image | ( | const p_complex< D, G > & | pc, | |
const metal::vec< D+1, std::vector< V > > & | values | |||
) | [inline] |
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).
const p_complex< D, G > & mln::complex_image< D, G, V >::domain | ( | ) | const [inline] |
Accessors.
Return the domain of psites od the image.
References mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::data_, and mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::is_valid().
Referenced by mln::init_().
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
.
[in] | p | A site. |
p
. void mln::complex_image< D, G, V >::init_ | ( | const p_complex< D, G > & | pc, | |
const metal::vec< D+1, std::vector< V > > & | values | |||
) | [inline] |
Initialize an empty image.
References mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::data_, and mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::is_valid().
Referenced by mln::complex_image< D, G, V >::complex_image(), and mln::init_().
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.
complex_image< D, G, V >::rvalue mln::complex_image< D, G, V >::operator() | ( | const complex_psite< D, G > & | p | ) | const [inline] |
Read-only access of face value at point site p
.
References mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::data_, mln::complex_psite< D, G >::face_id(), and mln::complex_psite< D, G >::n().
complex_image< D, G, V >::lvalue mln::complex_image< D, G, V >::operator() | ( | const complex_psite< D, G > & | p | ) | [inline] |
Read-write access of face value at point site p
.
References mln::internal::image_base< V, p_complex< D, G >, complex_image< D, G, V > >::data_, mln::complex_psite< D, G >::face_id(), and mln::complex_psite< D, G >::n().
const metal::vec< D+1, std::vector< V > > & mln::complex_image< D, G, V >::values | ( | ) | const [inline] |
Return the array of values associated to the faces.
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(), and mln::init_().
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.
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] |
const unsigned mln::complex_image< D, G, V >::dim = D [static] |
The dimension of the complex.