mln::dpoint< G, C > Struct Template Reference

Generic delta-point class. More...

#include <dpoint.hh>

Inheritance diagram for mln::dpoint< G, C >:

Inheritance graph

List of all members.

Public Types

enum  { dim = G::dim }
typedef C coord
 Coordinate associated type.
typedef G grid
 Grid associated type.
typedef point< G, C > psite
 Psite associated type.
typedef point< G, C > site
 Site associated type.
typedef algebra::vec< G::dim, C > vec
 Algebra vector (vec) associated type.

Public Member Functions

template<typename F >
 dpoint (const Function_v2v< F > &f)
 Constructor; coordinates are set by function f.
template<typename C2 >
 dpoint (const algebra::vec< dim, C2 > &v)
 Constructor from an algebra vector.
 dpoint ()
 Constructor without argument.
template<typename Q >
 operator mln::algebra::vec< dpoint< G, C >::dim, Q > () const
 Conversion towards a algebra::vec.
C & operator[] (unsigned i)
 Read-write access to the i-th coordinate value.
operator[] (unsigned i) const
 Read-only access to the i-th coordinate value.
void set_all (C c)
 Set all coordinates to the value c.
vec to_vec () const
 Explicit conversion.
 dpoint (const literal::zero_t &)
 Constructors/assignments with literals.
 dpoint (C ind)


Detailed Description

template<typename G, typename C>
struct mln::dpoint< G, C >

Generic delta-point class.

Parameters are G the dimension of the space and C the coordinate type in this space.


Member Typedef Documentation

template<typename G, typename C>
typedef C mln::dpoint< G, C >::coord

Coordinate associated type.

template<typename G, typename C>
typedef G mln::dpoint< G, C >::grid

Grid associated type.

template<typename G, typename C>
typedef point<G,C> mln::dpoint< G, C >::psite

Psite associated type.

template<typename G, typename C>
typedef point<G,C> mln::dpoint< G, C >::site

Site associated type.

template<typename G, typename C>
typedef algebra::vec<G::dim, C> mln::dpoint< G, C >::vec

Algebra vector (vec) associated type.


Member Enumeration Documentation

template<typename G, typename C>
anonymous enum

Enumerator:
dim  Dimension of the space.

Invariant:
dim > 0


Constructor & Destructor Documentation

template<typename G , typename C >
mln::dpoint< G, C >::dpoint (  )  [inline]

Constructor without argument.

template<typename G , typename C >
template<typename C2 >
mln::dpoint< G, C >::dpoint ( const algebra::vec< dim, C2 > &  v  )  [inline]

Constructor from an algebra vector.

References mln::dpoint< G, C >::dim.

template<typename G , typename C>
mln::dpoint< G, C >::dpoint ( ind  )  [inline]

Constructors with different numbers of arguments (coordinates) w.r.t. the dimension.

template<typename G , typename C>
mln::dpoint< G, C >::dpoint ( const literal::zero_t  )  [inline]

Constructors/assignments with literals.

template<typename G , typename C >
template<typename F >
mln::dpoint< G, C >::dpoint ( const Function_v2v< F > &  f  )  [inline]

Constructor; coordinates are set by function f.

References mln::dpoint< G, C >::dim.


Member Function Documentation

template<typename G , typename C >
template<typename Q >
mln::dpoint< G, C >::operator mln::algebra::vec< dpoint< G, C >::dim, Q > (  )  const [inline]

Conversion towards a algebra::vec.

References mln::dpoint< G, C >::to_vec().

template<typename G , typename C >
C & mln::dpoint< G, C >::operator[] ( unsigned  i  )  [inline]

Read-write access to the i-th coordinate value.

Parameters:
[in] i The coordinate index.
Precondition:
i < dim

References mln::dpoint< G, C >::dim.

template<typename G , typename C >
C mln::dpoint< G, C >::operator[] ( unsigned  i  )  const [inline]

Read-only access to the i-th coordinate value.

Parameters:
[in] i The coordinate index.
Precondition:
i < dim

References mln::dpoint< G, C >::dim.

template<typename G , typename C>
void mln::dpoint< G, C >::set_all ( c  )  [inline]

Set all coordinates to the value c.

References mln::dpoint< G, C >::dim.

Referenced by mln::win::line< M, i, C >::line().

template<typename G , typename C >
dpoint< G, C >::vec mln::dpoint< G, C >::to_vec (  )  const [inline]


Generated on Tue Jul 14 16:32:17 2009 for Milena (Olena) by  doxygen 1.5.9