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

mln::algebra::h_vec< d, C > Class Template Reference

N-Dimensional vector with homogeneous coordinates. More...

#include <h_vec.hh>

Inheritance diagram for mln::algebra::h_vec< d, C >:
Inheritance graph

List of all members.

Public Types

enum  
enum  { dim = d }
 

Dimension is the 'natural' one (3 for 3D), not the one of the vector (dim + 1).

More...
typedef Object< void > category
typedef C coord
typedef C enc [n]
typedef C equiv [n]
typedef vec< n, C > exact_t

Public Member Functions

 h_vec ()
 Constructor without argument.
 h_vec (const vec< d+1, C > &other)
 Constructor with the underlying vector.
const vec< n, C > & normalize ()
 operator mat< n, 1, U > () const
 Conversion to a matrix.
h_vecoperator= (const vec< d+1, C > &rhs)
const C & operator[] (unsigned i) const
C & operator[] (unsigned i)
void set_all (const C &val)
unsigned size () const
mat< 1, n, C > t () const
 Transposition.
algebra::h_vec< n, C > to_h_vec () const
vec< d, C > to_vec () const
 Back to the natural (non-homogeneous) space.

Static Public Attributes

static const vec< n, C > origin
 Origin value.
static const vec< n, C > zero
 Zero value.

Protected Attributes

data_ [n]

Detailed Description

template<unsigned d, typename C>
class mln::algebra::h_vec< d, C >

N-Dimensional vector with homogeneous coordinates.

Definition at line 94 of file h_vec.hh.


Member Typedef Documentation

typedef Object<void> mln::Object< vec< n, C > >::category [inherited]

Definition at line 174 of file object.hh.

typedef C mln::algebra::vec< n, C >::coord [inherited]

Definition at line 186 of file algebra/vec.hh.

typedef C mln::algebra::vec< n, C >::enc[n] [inherited]

Definition at line 184 of file algebra/vec.hh.

typedef C mln::algebra::vec< n, C >::equiv[n] [inherited]

Definition at line 183 of file algebra/vec.hh.

typedef vec< n, C > mln::Object< vec< n, C > >::exact_t [inherited]

Definition at line 173 of file object.hh.


Member Enumeration Documentation

anonymous enum [inherited]

Definition at line 187 of file algebra/vec.hh.

template<unsigned d, typename C>
anonymous enum

Dimension is the 'natural' one (3 for 3D), not the one of the vector (dim + 1).

Enumerator:
dim 

Definition at line 98 of file h_vec.hh.


Constructor & Destructor Documentation

template<unsigned d, typename C >
mln::algebra::h_vec< d, C >::h_vec (  )  [inline]

Constructor without argument.

Definition at line 117 of file h_vec.hh.

References mln::algebra::internal::vec_base_< n, C >::data_, and mln::literal::one.

template<unsigned d, typename C >
mln::algebra::h_vec< d, C >::h_vec ( const vec< d+1, C > &  other  )  [inline]

Constructor with the underlying vector.

Definition at line 128 of file h_vec.hh.


Member Function Documentation

const vec<n, C >& mln::algebra::vec< n, C >::normalize (  )  [inherited]
mln::algebra::vec< n, C >::operator mat< n, 1, U > (  )  const [inherited]

Conversion to a matrix.

template<unsigned d, typename C >
h_vec< d, C > & mln::algebra::h_vec< d, C >::operator= ( const vec< d+1, C > &  rhs  )  [inline]

Definition at line 135 of file h_vec.hh.

const C & mln::algebra::vec< n, C >::operator[] ( unsigned  i  )  const [inherited]
C & mln::algebra::vec< n, C >::operator[] ( unsigned  i  )  [inherited]
void mln::algebra::vec< n, C >::set_all ( const C &  val  )  [inherited]
unsigned mln::algebra::vec< n, C >::size (  )  const [inherited]
mat<1, n, C > mln::algebra::vec< n, C >::t (  )  const [inherited]

Transposition.

algebra::h_vec<n, C > mln::algebra::vec< n, C >::to_h_vec (  )  const [inherited]
template<unsigned d, typename C >
vec< d, C > mln::algebra::h_vec< d, C >::to_vec (  )  const [inline]

Back to the natural (non-homogeneous) space.

Definition at line 145 of file h_vec.hh.

References mln::algebra::internal::vec_base_< n, C >::data_.

Referenced by mln::fun::internal::x2x_linear_impl_< T2::result, T2::data_t, E >::operator()().


Member Data Documentation

C mln::algebra::internal::vec_base_< n, C >::data_[n] [protected, inherited]
const vec<n, C > mln::algebra::vec< n, C >::origin [static, inherited]

Origin value.

Definition at line 247 of file algebra/vec.hh.

const vec<n, C > mln::algebra::vec< n, C >::zero [static, inherited]

Zero value.

Definition at line 244 of file algebra/vec.hh.