OpenIndy-Core  0.2.0.43
oi::math::OiVec Class Reference

The OiVec class. More...

#include <oivec.h>

Public Member Functions

 OiVec ()
 
 OiVec (const int &size)
 
 ~OiVec ()
 
double getAt (int pos) const
 OiVec::getAt Get The value at the specified position. More...
 
int getSize () const
 OiVec::getSize Returns the size of the vector. More...
 
void set (vector< double > v)
 OiVec::set Replace the list by another. More...
 
void setAt (const int &pos, const double &value)
 OiVec::setAt Set the vector element at the specified position. More...
 
void add (const double &value)
 OiVec::add Add an element at the end of the vector. More...
 
void removeLast ()
 OiVec::removeLast. More...
 
void replace (const OiVec &)
 OiVec::replace. More...
 
OiVecoperator= (const OiVec &)
 OiVec::operator = Assign a vector to another. More...
 
OiVec operator+ (const OiVec &) const
 OiVec::operator + Add v to this vector. More...
 
OiVec operator- (const OiVec &) const
 OiVec::operator - Substract v from this vector. More...
 
OiVecoperator+= (const OiVec &)
 OiVec::operator +=. More...
 
OiVecoperator-= (const OiVec &)
 OiVec::operator -=. More...
 
void normalize ()
 OiVec::normalize. More...
 
OiMat t () const
 OiVec::t Calculate the transposed of this vector which is a matrix. More...
 

Static Public Member Functions

static void cross (OiVec &result, const OiVec &a, const OiVec &b)
 OiVec::cross Calculate cross product (only if a and b are 3 dimensional vectors) More...
 
static void dot (double &result, const OiVec &a, const OiVec &b)
 OiVec::dot Calculate scalar product (only if a and b are of same size) More...
 

Static Public Attributes

static LinearAlgebramyLinearAlgebra = NULL
 

Friends

OiVec operator* (const OiVec &v, const double value)
 
OiVec operator* (const double value, const OiVec &v)
 
OiVec operator/ (const OiVec &v, const double value)
 

Detailed Description

The OiVec class.

Constructor & Destructor Documentation

OiVec::OiVec ( )
OiVec::OiVec ( const int &  size)
OiVec::~OiVec ( )

Member Function Documentation

void OiVec::add ( const double &  value)

OiVec::add Add an element at the end of the vector.

Parameters
value
void OiVec::cross ( OiVec result,
const OiVec a,
const OiVec b 
)
static

OiVec::cross Calculate cross product (only if a and b are 3 dimensional vectors)

Parameters
result
a
b
void OiVec::dot ( double &  result,
const OiVec a,
const OiVec b 
)
static

OiVec::dot Calculate scalar product (only if a and b are of same size)

Parameters
result
a
b
double OiVec::getAt ( int  pos) const

OiVec::getAt Get The value at the specified position.

Parameters
pos
Returns
int OiVec::getSize ( ) const

OiVec::getSize Returns the size of the vector.

Returns
void OiVec::normalize ( )
OiVec OiVec::operator+ ( const OiVec v) const

OiVec::operator + Add v to this vector.

Parameters
v
Returns
OiVec & OiVec::operator+= ( const OiVec v)

OiVec::operator +=.

Parameters
v
Returns
OiVec OiVec::operator- ( const OiVec v) const

OiVec::operator - Substract v from this vector.

Parameters
v
Returns
OiVec & OiVec::operator-= ( const OiVec v)

OiVec::operator -=.

Parameters
v
Returns
OiVec & OiVec::operator= ( const OiVec v)

OiVec::operator = Assign a vector to another.

Parameters
v
Returns
void OiVec::removeLast ( )
void OiVec::replace ( const OiVec v)
void OiVec::set ( vector< double >  v)

OiVec::set Replace the list by another.

Parameters
v
void OiVec::setAt ( const int &  pos,
const double &  value 
)

OiVec::setAt Set the vector element at the specified position.

Parameters
pos
value
OiMat OiVec::t ( ) const

OiVec::t Calculate the transposed of this vector which is a matrix.

Returns

Friends And Related Function Documentation

OiVec operator* ( const OiVec v,
const double  value 
)
friend
OiVec operator* ( const double  value,
const OiVec v 
)
friend
OiVec operator/ ( const OiVec v,
const double  value 
)
friend

Member Data Documentation

LinearAlgebra * OiVec::myLinearAlgebra = NULL
static

The documentation for this class was generated from the following files: