Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

xchen::Vector< T, Sz > Class Template Reference

A fixed-size sequential container. More...

#include <Vector.H>

Inheritance diagram for xchen::Vector< T, Sz >:

xchen::BaseVector< T > List of all members.

[NOHEADER]

typedef T value_type
 interface as std::vector

typedef T & reference
 interface as std::vector

typedef const T & const_reference
 interface as std::vector

typedef T * iterator
 interface as std::vector

typedef const T * const_iterator
 interface as std::vector

typedef std::reverse_iterator<
iterator
reverse_iterator
 interface as std::vector

typedef std::reverse_iterator<
const_iterator
const_reverse_iterator
 interface as std::vector

iterator begin ()
 interface as std::vector

iterator end ()
 interface as std::vector

const_iterator begin () const
 interface as std::vector

const_iterator end () const
 interface as std::vector

reverse_iterator rbegin ()
 interface as std::vector

const_reverse_iterator rbegin () const
 interface as std::vector

reverse_iterator rend ()
 interface as std::vector

const_reverse_iterator rend () const
 interface as std::vector

front ()
 interface as std::vector

const_reference front () const
 interface as std::vector

back ()
 interface as std::vector

const_reference back () const
 interface as std::vector

T & operator[] (size_t idx)
 interface as std::vector

const T & operator[] (size_t idx) const
 interface as std::vector

bool operator< (Vector const &rhs) const
 interface as std::vector

bool operator== (const Vector &rhs) const
 interface as std::vector

bool empty ()
 interface as std::vector

size_t max_size ()
 interface as std::vector


Public Methods

 Vector (const_iterator itr)
 assume enough data elements given

template<class T2, int Sz2>  Vector (const Vector< T2, Sz2 > &rhs)
 constructor from hetergenous Vector

template<class T2>  Vector (const BaseVector< T2 > &rhs)
 constructor from hetergenous BaseVector

 Vector ()
ListAssignmentCheckSzCt< T,
T *, Sz-1 > 
operator= (T x)
size_t size () const
 Vector (R e0)
 constructors from element list. If not enough elements given, default to 0.

 Vector (R e0, R e1)
 constructors from element list. If not enough elements given, default to 0.

 Vector (R e0, R e1, R e2)
 constructors from element list. If not enough elements given, default to 0.

 Vector (R e0, R e1, R e2, R e3)
 constructors from element list. If not enough elements given, default to 0.

 Vector (R e0, R e1, R e2, R e3, R e4)
 constructors from element list. If not enough elements given, default to 0.

 Vector (R e0, R e1, R e2, R e3, R e4, R e5)
 constructors from element list. If not enough elements given, default to 0.

Vector operator- ()
 vector operations.

Vector & operator+= (const Vector &r)
 vector operations.

Vector & operator-= (const Vector &r)
 vector operations.

Vector & operator *= (double s)
 vector operations.

Vector & operator/= (double s)
 vector operations.

Vector operator+ (const Vector &r) const
 vector operations.

Vector operator- (const Vector &r) const
 vector operations.

Vector operator * (double s) const
 vector operations.

Vector operator/ (double s) const
 vector operations.

Vector & Sxw (T s)
 scale x and w components.

Vector & Syw (T s)
 scale y and w components.

Vector & Szw (T s)
 scale z and w components.

T * GetData ()
 vector operations.

const T * GetData () const
 vector operations.

operator * (const Vector &r) const
 vector operations.

Vector operator^ (const Vector &r) const
 vector operations.

Vector & operator^= (const Vector &r)
 vector operations.

double GetNorm () const
 vector operations.

GetSquareNorm () const
 vector operations.

void Normalize ()
 vector operations.

Vector GetNormalizedVector () const
 vector operations.

Vector GetProject2Sphere () const
 vector operations.

Vector GetProject2AffinePlane () const
 vector operations.

Vector GetProjection (const Vector &r) const
 vector operations.

Vector< T, Sz-1 > GetProjection () const
 vector operations.

Vector< T, Sz+1 > GetPromotion () const
 vector operations.

double Distance (const Vector &v) const
 vector operations.

double Angle (const Vector &r) const
 vector operations.

LinearCombine (const Vector< double, Sz > lambda) const
 operation on vector of (column) vectors

AffineCombine (const Vector< double, Sz > lambda) const
 operation on vector of (column) vectors

VectorCombine (const Vector< double, Sz > lambda) const
 operation on vector of (column) vectors


Friends

ostream & operator (ostream &os, const Vector &v)
istream & operator>> (istream &is, Vector &v)

Detailed Description

template<class T, int Sz>
class xchen::Vector< T, Sz >

A fixed-size sequential container.


Member Typedef Documentation

template<class T, int Sz>
typedef const T* xchen::Vector< T, Sz >::const_iterator
 

interface as std::vector

template<class T, int Sz>
typedef const T& xchen::Vector< T, Sz >::const_reference
 

interface as std::vector

template<class T, int Sz>
typedef std::reverse_iterator<const_iterator> xchen::Vector< T, Sz >::const_reverse_iterator
 

interface as std::vector

template<class T, int Sz>
typedef T* xchen::Vector< T, Sz >::iterator
 

interface as std::vector

template<class T, int Sz>
typedef T& xchen::Vector< T, Sz >::reference
 

interface as std::vector

template<class T, int Sz>
typedef std::reverse_iterator<iterator> xchen::Vector< T, Sz >::reverse_iterator
 

interface as std::vector

template<class T, int Sz>
typedef T xchen::Vector< T, Sz >::value_type
 

interface as std::vector


Constructor & Destructor Documentation

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector const_iterator    itr [inline]
 

assume enough data elements given

template<class T, int Sz>
template<class T2, int Sz2>
xchen::Vector< T, Sz >::Vector const Vector< T2, Sz2 > &    rhs [inline]
 

constructor from hetergenous Vector

template<class T, int Sz>
template<class T2>
xchen::Vector< T, Sz >::Vector< T, Sz > const BaseVector< T2 > &    rhs
 

constructor from hetergenous BaseVector

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   [inline]
 

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0 [inline]
 

constructors from element list. If not enough elements given, default to 0.

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0,
  e1
[inline]
 

constructors from element list. If not enough elements given, default to 0.

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0,
  e1,
  e2
[inline]
 

constructors from element list. If not enough elements given, default to 0.

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0,
  e1,
  e2,
  e3
[inline]
 

constructors from element list. If not enough elements given, default to 0.

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0,
  e1,
  e2,
  e3,
  e4
[inline]
 

constructors from element list. If not enough elements given, default to 0.

template<class T, int Sz>
xchen::Vector< T, Sz >::Vector   e0,
  e1,
  e2,
  e3,
  e4,
  e5
[inline]
 

constructors from element list. If not enough elements given, default to 0.


Member Function Documentation

template<class T, int Sz>
T xchen::Vector< T, Sz >::AffineCombine const Vector< double, Sz >    lambda const
 

operation on vector of (column) vectors

template<class T, int Sz>
double xchen::Vector< T, Sz >::Angle const Vector< T, Sz > &    r const
 

vector operations.

template<class T, int Sz>
const_reference xchen::Vector< T, Sz >::back   const [inline]
 

interface as std::vector

template<class T, int Sz>
T xchen::Vector< T, Sz >::back   [inline]
 

interface as std::vector

template<class T, int Sz>
const_iterator xchen::Vector< T, Sz >::begin   const [inline]
 

interface as std::vector

template<class T, int Sz>
iterator xchen::Vector< T, Sz >::begin   [inline]
 

interface as std::vector

template<class T, int Sz>
double xchen::Vector< T, Sz >::Distance const Vector< T, Sz > &    v const [inline]
 

vector operations.

template<class T, int Sz>
bool xchen::Vector< T, Sz >::empty   [inline, static]
 

interface as std::vector

template<class T, int Sz>
const_iterator xchen::Vector< T, Sz >::end   const [inline]
 

interface as std::vector

template<class T, int Sz>
iterator xchen::Vector< T, Sz >::end   [inline]
 

interface as std::vector

template<class T, int Sz>
const_reference xchen::Vector< T, Sz >::front   const [inline]
 

interface as std::vector

template<class T, int Sz>
T xchen::Vector< T, Sz >::front   [inline]
 

interface as std::vector

template<class T, int Sz>
const T* xchen::Vector< T, Sz >::GetData   const [inline]
 

vector operations.

template<class T, int Sz>
T* xchen::Vector< T, Sz >::GetData   [inline]
 

vector operations.

template<class T, int Sz>
double xchen::Vector< T, Sz >::GetNorm   const [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::GetNormalizedVector   const [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::GetProject2AffinePlane   const [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::GetProject2Sphere   const [inline]
 

vector operations.

template<class T, int Sz>
Vector<T,Sz-1> xchen::Vector< T, Sz >::GetProjection   const [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::GetProjection const Vector< T, Sz > &    r const [inline]
 

vector operations.

template<class T, int Sz>
Vector<T,Sz+1> xchen::Vector< T, Sz >::GetPromotion   const [inline]
 

vector operations.

template<class T, int Sz>
T xchen::Vector< T, Sz >::GetSquareNorm   const [inline]
 

vector operations.

template<class T, int Sz>
T xchen::Vector< T, Sz >::LinearCombine const Vector< double, Sz >    lambda const
 

operation on vector of (column) vectors

template<class T, int Sz>
size_t xchen::Vector< T, Sz >::max_size   [inline, static]
 

interface as std::vector

template<class T, int Sz>
void xchen::Vector< T, Sz >::Normalize   [inline]
 

vector operations.

template<class T, int Sz>
T xchen::Vector< T, Sz >::operator * const Vector< T, Sz > &    r const [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::operator * double    s const [inline]
 

vector operations.

template<class T, int Sz>
Vector& xchen::Vector< T, Sz >::operator *= double    s [inline]
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::operator+ const Vector< T, Sz > &    r const [inline]
 

vector operations.

template<class T, int Sz>
Vector< T, Sz > & xchen::Vector< T, Sz >::operator+= const Vector< T, Sz > &    r
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::operator- const Vector< T, Sz > &    r const [inline]
 

vector operations.

template<class T, int Sz>
Vector< T, Sz > xchen::Vector< T, Sz >::operator-  
 

vector operations.

template<class T, int Sz>
Vector< T, Sz > & xchen::Vector< T, Sz >::operator-= const Vector< T, Sz > &    r
 

vector operations.

template<class T, int Sz>
Vector xchen::Vector< T, Sz >::operator/ double    s const [inline]
 

vector operations.

template<class T, int Sz>
Vector& xchen::Vector< T, Sz >::operator/= double    s [inline]
 

vector operations.

template<class T, int Sz>
bool xchen::Vector< T, Sz >::operator< Vector< T, Sz > const &    rhs const [inline]
 

interface as std::vector

template<class T, int Sz>
ListAssignmentCheckSzCt<T, T*, Sz-1> xchen::Vector< T, Sz >::operator=   x [inline]
 

template<class T, int Sz>
bool xchen::Vector< T, Sz >::operator== const Vector< T, Sz > &    rhs const [inline]
 

interface as std::vector

template<class T, int Sz>
const T& xchen::Vector< T, Sz >::operator[] size_t    idx const [inline]
 

interface as std::vector

template<class T, int Sz>
T& xchen::Vector< T, Sz >::operator[] size_t    idx [inline]
 

interface as std::vector

template<class T, int Sz>
Vector< T, Sz > xchen::Vector< T, Sz >::operator^ const Vector< T, Sz > &    r const
 

vector operations.

template<class T, int Sz>
Vector< T, Sz > & xchen::Vector< T, Sz >::operator^= const Vector< T, Sz > &    r
 

vector operations.

template<class T, int Sz>
const_reverse_iterator xchen::Vector< T, Sz >::rbegin   const [inline]
 

interface as std::vector

template<class T, int Sz>
reverse_iterator xchen::Vector< T, Sz >::rbegin   [inline]
 

interface as std::vector

template<class T, int Sz>
const_reverse_iterator xchen::Vector< T, Sz >::rend   const [inline]
 

interface as std::vector

template<class T, int Sz>
reverse_iterator xchen::Vector< T, Sz >::rend   [inline]
 

interface as std::vector

template<class T, int Sz>
size_t xchen::Vector< T, Sz >::size   const [inline, virtual]
 

Reimplemented from xchen::BaseVector< T >.

template<class T, int Sz>
Vector& xchen::Vector< T, Sz >::Sxw   s [inline]
 

scale x and w components.

template<class T, int Sz>
Vector& xchen::Vector< T, Sz >::Syw   s [inline]
 

scale y and w components.

template<class T, int Sz>
Vector& xchen::Vector< T, Sz >::Szw   s [inline]
 

scale z and w components.

template<class T, int Sz>
T xchen::Vector< T, Sz >::VectorCombine const Vector< double, Sz >    lambda const
 

operation on vector of (column) vectors


Friends And Related Function Documentation

template<class T, int Sz>
ostream& operator ostream &    os,
const Vector< T, Sz > &    v
[friend]
 

template<class T, int Sz>
istream& operator>> istream &    is,
Vector< T, Sz > &    v
[friend]
 


The documentation for this class was generated from the following file:
Generated on Wed Apr 7 21:40:52 2004 by doxygen1.2.18