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

mln::metal::vec< n, T > Class Template Reference

#include <vec.hh>

Inheritance diagram for mln::metal::vec< n, T >:
Inheritance graph

List of all members.

Public Types

enum  { dim = n }
typedef Object< void > category
typedef T coord
typedef T enc [n]
typedef T equiv [n]
typedef vec< n, T > exact_t

Public Member Functions

const vec< n, T > & normalize ()
template<typename U >
vecoperator= (const vec< n, U > &rhs)
const T & operator[] (unsigned i) const
T & operator[] (unsigned i)
void set_all (const T &val)
unsigned size () const
algebra::h_vec< n, T > to_h_vec () const
template<typename F >
 vec (const Function_v2v< F > &f)
 Constructor; coordinates are set by function f.
 vec (const vec< n, T > &rhs)
template<typename U >
 vec (const vec< n, U > &rhs)
 vec ()

 vec (const literal::zero_t &)
 Constructors/assignments with literal zero.
vecoperator= (const literal::zero_t &)

Static Public Attributes

static const vec< n, T > origin = all_to(0)
 Origin value.
static const vec< n, T > zero = all_to(0)
 Zero value.

Protected Attributes

data_ [n]

Private Types

typedef internal::vec_base_< n, T > super_

Detailed Description

template<unsigned n, typename T>
class mln::metal::vec< n, T >

Definition at line 160 of file metal/vec.hh.


Member Typedef Documentation

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

Definition at line 174 of file object.hh.

template<unsigned n, typename T>
typedef T mln::metal::vec< n, T >::coord

Definition at line 172 of file metal/vec.hh.

template<unsigned n, typename T>
typedef T mln::metal::vec< n, T >::enc[n]

Definition at line 170 of file metal/vec.hh.

template<unsigned n, typename T>
typedef T mln::metal::vec< n, T >::equiv[n]

Definition at line 169 of file metal/vec.hh.

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

Definition at line 173 of file object.hh.

template<unsigned n, typename T>
typedef internal::vec_base_<n, T> mln::metal::vec< n, T >::super_ [private]

Definition at line 162 of file metal/vec.hh.


Member Enumeration Documentation

template<unsigned n, typename T>
anonymous enum
Enumerator:
dim 

Definition at line 173 of file metal/vec.hh.


Constructor & Destructor Documentation

template<unsigned n, typename T >
mln::metal::vec< n, T >::vec (  )  [inline]

Definition at line 332 of file metal/vec.hh.

template<unsigned n, typename T >
mln::metal::vec< n, T >::vec ( const literal::zero_t  )  [inline]

Constructors/assignments with literal zero.

Definition at line 338 of file metal/vec.hh.

References mln::metal::vec< n, T >::set_all().

template<unsigned n, typename T>
mln::metal::vec< n, T >::vec ( const vec< n, T > &  rhs  )  [inline]

Definition at line 354 of file metal/vec.hh.

References mln::metal::internal::vec_base_< n, T >::data_.

template<unsigned n, typename T >
template<typename U >
mln::metal::vec< n, T >::vec ( const vec< n, U > &  rhs  )  [inline]

Definition at line 364 of file metal/vec.hh.

References mln::metal::internal::vec_base_< n, T >::data_.

template<unsigned n, typename T >
template<typename F >
mln::metal::vec< n, T >::vec ( const Function_v2v< F > &  f  )  [inline]

Constructor; coordinates are set by function f.

Definition at line 428 of file metal/vec.hh.

References mln::metal::internal::vec_base_< n, T >::data_, and mln::exact().


Member Function Documentation

template<unsigned n, typename T >
const vec< n, T > & mln::metal::vec< n, T >::normalize (  )  [inline]

Definition at line 414 of file metal/vec.hh.

References mln::metal::internal::vec_base_< n, T >::data_.

template<unsigned n, typename T >
vec< n, T > & mln::metal::vec< n, T >::operator= ( const literal::zero_t  )  [inline]

Definition at line 346 of file metal/vec.hh.

References mln::metal::vec< n, T >::set_all().

template<unsigned n, typename T >
template<typename U >
vec< n, T > & mln::metal::vec< n, T >::operator= ( const vec< n, U > &  rhs  )  [inline]

Definition at line 374 of file metal/vec.hh.

References mln::metal::internal::vec_base_< n, T >::data_.

template<unsigned n, typename T >
const T & mln::metal::vec< n, T >::operator[] ( unsigned  i  )  const [inline]
template<unsigned n, typename T >
T & mln::metal::vec< n, T >::operator[] ( unsigned  i  )  [inline]
template<unsigned n, typename T>
void mln::metal::vec< n, T >::set_all ( const T &  val  )  [inline]
template<unsigned n, typename T >
unsigned mln::metal::vec< n, T >::size (  )  const [inline]

Definition at line 407 of file metal/vec.hh.

template<unsigned n, typename T>
algebra::h_vec<n, T> mln::metal::vec< n, T >::to_h_vec (  )  const

Member Data Documentation

template<unsigned n, typename T>
T mln::metal::internal::vec_base_< n, T >::data_[n] [protected, inherited]
template<unsigned n, typename T>
const vec< n, T > mln::metal::vec< n, T >::origin = all_to(0) [static]

Origin value.

Definition at line 213 of file metal/vec.hh.

template<unsigned n, typename T>
const vec< n, T > mln::metal::vec< n, T >::zero = all_to(0) [static]

Zero value.

Definition at line 210 of file metal/vec.hh.