Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
mln::geom::complex_geometry< D, P > Class Template Reference

A functor returning the sites of the faces of a complex where the locations of each 0-face is stored. More...

#include <complex_geometry.hh>

Public Member Functions

unsigned add_location (const P &p)
 Populate the set of locations.
 
 complex_geometry ()
 Build a complex geometry object.
 
site operator() (const mln::topo::face< D > &f) const
 Retrieve the site associated to f.
 

Detailed Description

template<unsigned D, typename P>
class mln::geom::complex_geometry< D, P >

A functor returning the sites of the faces of a complex where the locations of each 0-face is stored.

Faces of higher dimensions are computed.

Template Parameters
DThe dimension of the complex.
PThe type of the location of a 0-face.

Locations of 0-face are usually points (hence the P above), but can possibly be any (default-constructible) values.

The functor returns a std::vector of locations: 0-faces are singletons, 1-faces are (usually) pairs, faces of higher dimensions are arrays of locations.

Note that for consistency reasons w.r.t. the return type of operator(), returned sites are always arrays of locations attached to 0-faces; hence the returned singletons (of locations) for 0-faces.

Definition at line 88 of file geom/complex_geometry.hh.

Constructor & Destructor Documentation

template<unsigned D, typename P >
mln::geom::complex_geometry< D, P >::complex_geometry ( )
inline

Build a complex geometry object.

Definition at line 132 of file geom/complex_geometry.hh.

Member Function Documentation

template<unsigned D, typename P >
unsigned mln::geom::complex_geometry< D, P >::add_location ( const P &  p)
inline

Populate the set of locations.

Append a new location p. Return the index of the newly created location (which should semantically match the id of the corresonding 0-face in the complex).

Definition at line 140 of file geom/complex_geometry.hh.

template<unsigned D, typename P >
util::multi_site< P > mln::geom::complex_geometry< D, P >::operator() ( const mln::topo::face< D > &  f) const
inline

Retrieve the site associated to f.

Definition at line 151 of file geom/complex_geometry.hh.

References mln::topo::face< D >::face_id(), and mln::topo::face< D >::n().