Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Attributes | Related Functions | List of all members
BIAS::Vector2< T > Class Template Reference

class Vector2 contains a Vector of dim. More...

#include <Base/Math/Vector2.hh>

+ Inheritance diagram for BIAS::Vector2< T >:
+ Collaboration diagram for BIAS::Vector2< T >:

Public Types

typedef T value_type
 

Public Member Functions

void Add (const T &scalar, Vector2< T > &dest) const
 Addition with a scalar, storing results in destionation vector. More...
 
void Add (const Vector2< T > &argvec, Vector2< T > &destvec) const
 adding of two vectors, storing the result in destvec More...
 
void AddIP (const T &scalar)
 Addition (in place) of an scalar. More...
 
void AddIP (const Vector2< T > &argvec)
 in place adding More...
 
void clear ()
 stl conform interface More...
 
template<>
BIAS::Vector2< double > CoordEuclideanToPolar () const
 
BIAS::Vector2< T > CoordEuclideanToPolar () const
 coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y). More...
 
BIAS::Vector2< T > CoordEuclidianToPolar () const
 
template<>
BIAS::Vector2< double > CoordPolarToEuclidean () const
 
BIAS::Vector2< T > CoordPolarToEuclidean () const
 coordinate transform compute the euclidean coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system. More...
 
BIAS::Vector2< T > CoordPolarToEuclidian () const
 
void Copy (const T *pv)
 copy the array of vectorsize beginning at *T to this->data_ More...
 
double Dist (const Vector2< T > &vec) const
 Return the euclidean distance of 2 vectors. More...
 
DistLInf (const Vector2< T > &vec) const
 Return the maximum distance of 2 vectors. More...
 
void Divide (const T &scalar, Vector2< T > &dest) const
 Division with a scalar, storing results in destination vector. More...
 
void Divide (const Vector2< T > &vec, Vector2< T > &dest) const
 
void DivideIP (const T &scalar)
 Division (in place) of an scalar. More...
 
void DivideIP (const Vector2< T > &vec)
 elementwise Division (in place) by a vector More...
 
void ElementwiseDivision (const Vector2< T > &argvec, Vector2< T > &destvec) const
 
Vector2< T > ElementwiseDivision (const Vector2< T > &argvec) const
 
void ElementwiseProduct (const Vector2< T > &argvec, Vector2< T > &destvec) const
 multiply two vectors elementwise, storing the result in destvec More...
 
Vector2< T > ElementwiseProduct (const Vector2< T > &argvec) const
 
void Fill (T value)
 
const T * GetData () const
 get the data pointer the member function itself is const (before {..}) because it doesn't change the this object. More...
 
T * GetData ()
 
const unsigned int GetNumElements () const
 
T & GetW ()
 
GetW () const
 
T & GetX ()
 read only access functions to use names instead of indizes More...
 
GetX () const
 
T & GetY ()
 
GetY () const
 
bool IsZero () const
 
double Length () const
 return euclidean length More...
 
bool Load (const std::string &filename)
 method to load directly from a given filename. More...
 
max (const T a, const T b) const
 
min (const T a, const T b) const
 
void Multiply (const T &scalar, Vector2< T > &dest) const
 Multiplication with a scalar, storing results in destionation vector. More...
 
void MultiplyIP (const T &scalar)
 Multiplication (in place) of an scalar. More...
 
void Normalize ()
 Vector2<T>::Normalize. More...
 
NormL1 () const
 Return the L1 norm: |a| + |b|. More...
 
double NormL2 () const
 Return the L2 norm: sqrt(a^2 + b^2) More...
 
bool operator!= (const Vector2< T > &arg) const
 Comparison operator 'not equal'. More...
 
Vector2< T > & operator= (const T &scalar)
 assignment operator set the vector elementwise to scalar value More...
 
Vector2< T > & operator= (const Vector2< T > &vec)
 assignment operator More...
 
bool operator== (const Vector2< T > &arg) const
 Comparison operator 'equal'. More...
 
const T & operator[] (const int i) const
 access an element of the vector with 0-based indizes. More...
 
T & operator[] (const int i)
 access an element of the vector with 0-based indizes. More...
 
void OuterProduct (const BIAS::Vector2< T > &v, BIAS::Matrix2x2< T > &mat) const
 outer product, constructs a matrix (e.g. More...
 
Matrix2x2< T > OuterProduct (const BIAS::Vector2< T > &v) const
 
T & Phi ()
 polar form JW More...
 
Phi () const
 
T & Radius ()
 polar form JW More...
 
Radius () const
 
bool Save (const std::string &filename) const
 method to save directly to a given filename. More...
 
void ScalarProduct (const Vector2< T > &argvec, T &result) const
 scalar product of two vectors, storing the result in result More...
 
ScalarProduct (const Vector2< T > &argvec) const
 
void Set (const T &scalar)
 set all elements to a scalar value More...
 
void Set (const T &x, const T &y)
 set elementwise with given scalar values More...
 
void SetW (const T w)
 
void SetX (const T x)
 set (write) access functions to use names instead of indizes More...
 
void SetY (const T y)
 
void SetZero ()
 
const unsigned int Size () const
 
const unsigned int size () const
 
double SqrDist (const Vector2< T > &vec) const
 Return the squared distance of 2 vectors. More...
 
void Sub (const T &scalar, Vector2< T > &dest) const
 Substraction with a scalar, storing results in destionation vector. More...
 
void Sub (const Vector2< T > &argvec, Vector2< T > &destvec) const
 subtracting of two Vectors, storing the result in destvec More...
 
void SubIP (const T &scalar)
 Substraction (in place) of an scalar. More...
 
void SubIP (const Vector2< T > &argvec)
 in place subtraction More...
 
 Vector2 ()
 default constructor More...
 
 Vector2 (const Vector2< T > &vec)
 copy constructor More...
 
 Vector2 (const T &scalar)
 assignment with a constant value for all elements More...
 
 Vector2 (const T v0, const T v1)
 constructor with element assigment using explicit values More...
 
 Vector2 (const T *pv)
 assignment with an array of values which is copied into this ones class members More...
 
 Vector2 (char *s)
 constructor with element assignment More...
 
 Vector2 (const Vector< T > &v)
 cast constructor More...
 
 ~Vector2 ()
 destructor More...
 
Iterator Functions
T const * begin () const
 Iterator to first component of vector. More...
 
T * begin ()
 
T const * end () const
 Iterator pointing to one element after the last vector element. More...
 
T * end ()
 

Protected Attributes

data_ [VECTOR2SIZE]
 

Related Functions

(Note that these are not member functions.)

template<class T >
Vector2< T > operator* (const Vector2< T > &vec, const T &scalar)
 
template<class T >
Vector2< T > operator* (const T &scalar, const Vector2< T > &vec)
 
template<class T >
operator* (const Vector2< T > &vec, const Vector2< T > &argvec)
 
template<class T >
Vector2< T > operator* (const Matrix2x2< T > &mat, const Vector2< T > &vec)
 
template<class T >
Vector3< T > operator* (const Matrix3x2< T > &mat, const Vector2< T > &vec)
 
template<class T >
Vector2< T > operator+ (const Vector2< T > &vec, const Vector2< T > &argvec)
 
template<class T >
Vector2< T > operator- (const Vector2< T > &v)
 
template<class T >
Vector2< T > operator- (const Vector2< T > &vec, const T &scalar)
 
template<class T >
Vector2< T > operator- (const T &scalar, const Vector2< T > &vec)
 
template<class T >
Vector2< T > operator- (const Vector2< T > &vec, const Vector2< T > &argvec)
 
template<class T >
Vector2< T > operator/ (const Vector2< T > &vec, const T &scalar)
 
template<class T >
bool operator< (const Vector2< T > &a, const Vector2< T > &b)
 
std::ostream & operator<< (std::ostream &os, const Vector2< char > &vec)
 Output with streams Specialized for uc numerical display. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Vector2< T > &vec)
 Output with streams. More...
 
template<class T >
bool operator<= (const Vector2< T > &a, const Vector2< T > &b)
 
template<class T >
bool operator> (const Vector2< T > &a, const Vector2< T > &b)
 
template<class T >
bool operator>= (const Vector2< T > &a, const Vector2< T > &b)
 
std::istream & operator>> (std::istream &is, Vector2< char > &vec)
 Input with streams. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Vector2< T > &vec)
 Input with streams. More...
 

Detailed Description

template<class T>
class BIAS::Vector2< T >

class Vector2 contains a Vector of dim.

2 and fixed dimension

It's elment type is templated. manual loop unrolling is used if possible. The Vector is in row-major order (2 rows, 1 column) the indizes begin with zero (to size-1)

Author
Jan Woetzel untested (03/04/2002)

Definition at line 79 of file Vector2.hh.

Member Typedef Documentation

template<class T>
typedef T BIAS::Vector2< T >::value_type

Definition at line 82 of file Vector2.hh.

Constructor & Destructor Documentation

template<class T>
BIAS::Vector2< T >::~Vector2 ( )
inline

destructor

Author
Jan Woetzel untested (02/28/2002)

Definition at line 88 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( )
inline

default constructor

Author
Jan Woetzel alpha (02/28/2002)

Definition at line 94 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const Vector2< T > &  vec)
inline

copy constructor

Author
Jan Woetzel alpha (03/05/2002)

Definition at line 99 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const T &  scalar)
inlineexplicit

assignment with a constant value for all elements

Author
Jan Woetzel alpha (03/01/2002)

Definition at line 106 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const T  v0,
const T  v1 
)
inline

constructor with element assigment using explicit values

Author
Ingo Thomsen tested (03/04/2002)

Definition at line 114 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const T *  pv)
inlineexplicit

assignment with an array of values which is copied into this ones class members

Author
Jan Woetzel untested (02/28/2002)

Definition at line 124 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( char *  s)
inlineexplicit

constructor with element assignment

Author
Jan Woetzel alpha (03/01/2002)

Definition at line 131 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const Vector< T > &  v)

cast constructor

Author
Jan Woetzel alpha (03/22/2002)

Definition at line 41 of file Vector2.cpp.

References TNT::Vector< T >::size().

Member Function Documentation

template<class T>
void BIAS::Vector2< T >::Add ( const T &  scalar,
Vector2< T > &  dest 
) const
inline

Addition with a scalar, storing results in destionation vector.

Author
Ingo Thomsen

Definition at line 516 of file Vector2.hh.

Referenced by BIAS::operator+(), BIAS::Vector2< T >::operator+(), and BIAS::operator+=().

template<class T>
void BIAS::Vector2< T >::Add ( const Vector2< T > &  argvec,
Vector2< T > &  destvec 
) const
inline

adding of two vectors, storing the result in destvec

Author
Ingo Thomsen tested

Definition at line 596 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::AddIP ( const T &  scalar)
inline

Addition (in place) of an scalar.

Author
Ingo Thomsen

Definition at line 510 of file Vector2.hh.

Referenced by BIAS::operator+=().

template<class T>
void BIAS::Vector2< T >::AddIP ( const Vector2< T > &  argvec)
inline

in place adding

Author
Ingo Thomsen tested

Definition at line 588 of file Vector2.hh.

template<class T>
T const* BIAS::Vector2< T >::begin ( ) const
inline

Iterator to first component of vector.

Author
Stefan Reinhold

Definition at line 160 of file Vector2.hh.

template<class T>
T* BIAS::Vector2< T >::begin ( )
inline

Definition at line 163 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::clear ( )
inline

stl conform interface

Definition at line 201 of file Vector2.hh.

Referenced by BIAS::Interpolator::GetControlPoints().

template<>
BIAS::Vector2< double > BIAS::Vector2< double >::CoordEuclideanToPolar ( ) const

Definition at line 97 of file Vector2.cpp.

template<class T >
BIAS::Vector2< T > BIAS::Vector2< T >::CoordEuclideanToPolar ( ) const

coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y).

with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author
Jan Woetzel 09/2003

Definition at line 84 of file Vector2.cpp.

template<class T>
BIAS::Vector2<T> BIAS::Vector2< T >::CoordEuclidianToPolar ( ) const
inline

Definition at line 645 of file Vector2.hh.

template<>
BIAS::Vector2< double > BIAS::Vector2< double >::CoordPolarToEuclidean ( ) const

Definition at line 67 of file Vector2.cpp.

template<class T >
BIAS::Vector2< T > BIAS::Vector2< T >::CoordPolarToEuclidean ( ) const

coordinate transform compute the euclidean coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author
Jan Woetzel 09/2003

Definition at line 54 of file Vector2.cpp.

template<class T>
BIAS::Vector2<T> BIAS::Vector2< T >::CoordPolarToEuclidian ( ) const
inline

Definition at line 631 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Copy ( const T *  pv)
inline

copy the array of vectorsize beginning at *T to this->data_

Author
Jan Woetzel untested (02/28/2002)

Definition at line 180 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::Dist ( const Vector2< T > &  vec) const
inline

Return the euclidean distance of 2 vectors.

Author
Birger Streckel
Date
08/2002

Definition at line 458 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::DistLInf ( const Vector2< T > &  vec) const
inline

Return the maximum distance of 2 vectors.

Author
djung, untested
Date
2009/6

Definition at line 477 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Divide ( const T &  scalar,
Vector2< T > &  dest 
) const
inline

Division with a scalar, storing results in destination vector.

Author
Ingo Thomsen

Definition at line 562 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator/().

template<class T>
void BIAS::Vector2< T >::Divide ( const Vector2< T > &  vec,
Vector2< T > &  dest 
) const
inline

Definition at line 572 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::DivideIP ( const T &  scalar)
inline

Division (in place) of an scalar.

Author
Ingo Thomsen

Definition at line 549 of file Vector2.hh.

Referenced by BIAS::CameraViewController::MotionTranslation(), BIAS::CameraViewController::MotionTranslationCoplanar(), and BIAS::operator/=().

template<class T>
void BIAS::Vector2< T >::DivideIP ( const Vector2< T > &  vec)
inline

elementwise Division (in place) by a vector

Author
JW

Definition at line 555 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::ElementwiseDivision ( const Vector2< T > &  argvec,
Vector2< T > &  destvec 
) const
inline

Definition at line 383 of file Vector2.hh.

template<class T>
Vector2<T> BIAS::Vector2< T >::ElementwiseDivision ( const Vector2< T > &  argvec) const
inline

Definition at line 393 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::ElementwiseProduct ( const Vector2< T > &  argvec,
Vector2< T > &  destvec 
) const
inline

multiply two vectors elementwise, storing the result in destvec

Author
Jan Woetzel (03/06/2002)

Definition at line 367 of file Vector2.hh.

template<class T>
Vector2<T> BIAS::Vector2< T >::ElementwiseProduct ( const Vector2< T > &  argvec) const
inline

Definition at line 374 of file Vector2.hh.

template<class T>
T const* BIAS::Vector2< T >::end ( ) const
inline

Iterator pointing to one element after the last vector element.

Author
Stefan Reinhold

Definition at line 169 of file Vector2.hh.

template<class T>
T* BIAS::Vector2< T >::end ( )
inline

Definition at line 172 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Fill ( value)
inline

Definition at line 617 of file Vector2.hh.

template<class T>
const T* BIAS::Vector2< T >::GetData ( ) const
inline

get the data pointer the member function itself is const (before {..}) because it doesn't change the this object.

Returns
the const pointer to the data array for reading
Author
Jan Woetzel untested (02/28/2002)

Definition at line 236 of file Vector2.hh.

Referenced by BIAS::HomgPoint2D::GetEuclidean(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator=(), BIAS::Vector2< T >::operator>>(), BIAS::operator>>(), BIAS::TrackerBaseAffine< StorageType >::Track_(), BIAS::TrackerBaseAffine2< StorageType >::Track_(), and BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2().

template<class T>
T* BIAS::Vector2< T >::GetData ( )
inline

Definition at line 240 of file Vector2.hh.

template<class T>
const unsigned int BIAS::Vector2< T >::GetNumElements ( ) const
inline

Definition at line 227 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetW ( )
inline

Definition at line 295 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::GetW ( ) const
inline

Definition at line 306 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetX ( )
inline

read only access functions to use names instead of indizes

Returns
the projective coordinate of the vector (they are usually not euclidean!)
Author
Jan Woetzel untested (03/04/2002)

Definition at line 289 of file Vector2.hh.

Referenced by BIAS::NurbsSurface::SetCTRLPointsToRandom().

template<class T>
T BIAS::Vector2< T >::GetX ( ) const
inline

Definition at line 300 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetY ( )
inline
template<class T>
T BIAS::Vector2< T >::GetY ( ) const
inline

Definition at line 303 of file Vector2.hh.

template<class T>
bool BIAS::Vector2< T >::IsZero ( ) const
inline
Author
Jan Woetzel

Definition at line 206 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::Length ( ) const
inline

return euclidean length

Author
JW

Definition at line 435 of file Vector2.hh.

template<class T >
bool BIAS::Vector2< T >::Load ( const std::string &  filename)

method to load directly from a given filename.

internally using stream operator

Author
Jan Woetzel 09/2005
Returns
false in case of error, true in case of success

Definition at line 132 of file Vector2.cpp.

template<class T>
T BIAS::Vector2< T >::max ( const T  a,
const T  b 
) const
inline

Definition at line 346 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::min ( const T  a,
const T  b 
) const
inline

Definition at line 342 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Multiply ( const T &  scalar,
Vector2< T > &  dest 
) const
inline

Multiplication with a scalar, storing results in destionation vector.

Author
Ingo Thomsen

Definition at line 542 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator*().

template<class T>
void BIAS::Vector2< T >::MultiplyIP ( const T &  scalar)
inline

Multiplication (in place) of an scalar.

Author
Ingo Thomsen

Definition at line 536 of file Vector2.hh.

Referenced by BIAS::operator*=().

template<class T>
void BIAS::Vector2< T >::Normalize ( )
inline

Vector2<T>::Normalize.

Definition at line 441 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::NormL1 ( ) const
inline

Return the L1 norm: |a| + |b|.

Author
Ingo Thomsen
Date
04/11/2002 untested

Definition at line 421 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::NormL2 ( ) const
inline
template<class T>
bool BIAS::Vector2< T >::operator!= ( const Vector2< T > &  arg) const
inline

Comparison operator 'not equal'.

Author
Ingo Thomsen tested

Definition at line 497 of file Vector2.hh.

template<class T>
Vector2<T>& BIAS::Vector2< T >::operator= ( const T &  scalar)
inline

assignment operator set the vector elementwise to scalar value

Author
Jan Woetzel alpha (02/28/2002)

Definition at line 249 of file Vector2.hh.

template<class T>
Vector2<T>& BIAS::Vector2< T >::operator= ( const Vector2< T > &  vec)
inline

assignment operator

Author
grest

Definition at line 257 of file Vector2.hh.

template<class T>
bool BIAS::Vector2< T >::operator== ( const Vector2< T > &  arg) const
inline

Comparison operator 'equal'.

Author
Ingo Thomsen tested

Definition at line 490 of file Vector2.hh.

template<class T>
const T& BIAS::Vector2< T >::operator[] ( const int  i) const
inline

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author
Jan Woetzel untested (03/01/2002)

Definition at line 267 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::operator[] ( const int  i)
inline

access an element of the vector with 0-based indizes.

write allowed

Author
Jan Woetzel untested (03/01/2002)

Definition at line 277 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::OuterProduct ( const BIAS::Vector2< T > &  v,
BIAS::Matrix2x2< T > &  mat 
) const
inline

outer product, constructs a matrix (e.g.

for covariance).

Author
koeser 08/2005 (cloned from vector3)

Definition at line 404 of file Vector2.hh.

template<class T>
Matrix2x2<T> BIAS::Vector2< T >::OuterProduct ( const BIAS::Vector2< T > &  v) const
inline

Definition at line 413 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::Phi ( )
inline

polar form JW

Definition at line 332 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::Phi ( ) const
inline

Definition at line 334 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::Radius ( )
inline

polar form JW

Definition at line 326 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::Radius ( ) const
inline

Definition at line 328 of file Vector2.hh.

template<class T >
bool BIAS::Vector2< T >::Save ( const std::string &  filename) const

method to save directly to a given filename.

internally using stream operator

Author
Jan Woetzel 09/2009
Returns
false in case of error, true in case of success

Definition at line 147 of file Vector2.cpp.

template<class T>
void BIAS::Vector2< T >::ScalarProduct ( const Vector2< T > &  argvec,
T &  result 
) const
inline
template<class T>
T BIAS::Vector2< T >::ScalarProduct ( const Vector2< T > &  argvec) const
inline

Definition at line 360 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Set ( const T &  scalar)
inline
template<class T>
void BIAS::Vector2< T >::Set ( const T &  x,
const T &  y 
)
inline

set elementwise with given scalar values

Author
Jan Woetzel alpha (02/28/2002)

Definition at line 215 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetW ( const T  w)
inline

Definition at line 321 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetX ( const T  x)
inline

set (write) access functions to use names instead of indizes

Author
Jan Woetzel untested (03/04/2002)

Definition at line 315 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetY ( const T  y)
inline

Definition at line 318 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetZero ( )
inline
Author
Jan Woetzel

Definition at line 196 of file Vector2.hh.

Referenced by BIAS::CameraViewController::InitMembers().

template<class T>
const unsigned int BIAS::Vector2< T >::Size ( ) const
inline
Returns
the size of this vector
Author
Jan Woetzel (02/28/2002)

Definition at line 223 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator>>(), and BIAS::operator>>().

template<class T>
const unsigned int BIAS::Vector2< T >::size ( ) const
inline
template<class T>
double BIAS::Vector2< T >::SqrDist ( const Vector2< T > &  vec) const
inline

Return the squared distance of 2 vectors.

Author
djung, untested
Date
2009/6

Definition at line 467 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Sub ( const T &  scalar,
Vector2< T > &  dest 
) const
inline

Substraction with a scalar, storing results in destionation vector.

Author
Ingo Thomsen

Definition at line 529 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator-(), and BIAS::operator-=().

template<class T>
void BIAS::Vector2< T >::Sub ( const Vector2< T > &  argvec,
Vector2< T > &  destvec 
) const
inline

subtracting of two Vectors, storing the result in destvec

Author
Ingo Thomsen tested

Definition at line 612 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SubIP ( const T &  scalar)
inline

Substraction (in place) of an scalar.

Author
Ingo Thomsen

Definition at line 523 of file Vector2.hh.

Referenced by BIAS::operator-=().

template<class T>
void BIAS::Vector2< T >::SubIP ( const Vector2< T > &  argvec)
inline

in place subtraction

Author
Ingo Thomsen tested

Definition at line 604 of file Vector2.hh.

Friends And Related Function Documentation

template<class T >
Vector2< T > operator* ( const Vector2< T > &  vec,
const T &  scalar 
)
related

Multiplication operator with scalar argument, returning new vector

Author
Ingo Thomsen, tested

Definition at line 137 of file Operators.hh.

References BIAS::Vector2< T >::Multiply().

template<class T >
Vector2< T > operator* ( const T &  scalar,
const Vector2< T > &  vec 
)
related

Multiplication operator with scalar argument, returning new vector

Author
Jung, copied for convenience

Definition at line 148 of file Operators.hh.

References BIAS::Vector2< T >::Multiply().

template<class T >
T operator* ( const Vector2< T > &  vec,
const Vector2< T > &  argvec 
)
related

Definition at line 360 of file Operators.hh.

template<class T >
Vector2< T > operator* ( const Matrix2x2< T > &  mat,
const Vector2< T > &  vec 
)
related

Definition at line 674 of file Operators.hh.

template<class T >
Vector3< T > operator* ( const Matrix3x2< T > &  mat,
const Vector2< T > &  vec 
)
related

Definition at line 696 of file Operators.hh.

template<class T >
Vector2< T > operator+ ( const Vector2< T > &  vec,
const Vector2< T > &  argvec 
)
related

add operator for two Vectors, returning new vector

Author
Ingo Thomsen, tested

Definition at line 340 of file Operators.hh.

References BIAS::Vector2< T >::Add().

template<class T >
Vector2< T > operator- ( const Vector2< T > &  v)
related
Author
herzog 2005-07-19

Definition at line 56 of file Operators.hh.

template<class T >
Vector2< T > operator- ( const Vector2< T > &  vec,
const T &  scalar 
)
related

Substraction operator with scalar argument, returning new vector

Author
Ingo Thomsen, tested

Definition at line 115 of file Operators.hh.

References BIAS::Vector2< T >::Sub().

template<class T >
Vector2< T > operator- ( const T &  scalar,
const Vector2< T > &  vec 
)
related

Substraction operator with scalar argument, returning new vector

Author
Ingo Thomsen, djung, copy-paste

Definition at line 126 of file Operators.hh.

References BIAS::Vector2< T >::Sub().

template<class T >
Vector2< T > operator- ( const Vector2< T > &  vec,
const Vector2< T > &  argvec 
)
related

sub operator for two Vectors, returning new vector

Author
Ingo Thomsen, tested

Definition at line 351 of file Operators.hh.

References BIAS::Vector2< T >::Sub().

template<class T >
Vector2< T > operator/ ( const Vector2< T > &  vec,
const T &  scalar 
)
related

Division operator with scalar argument, returning new vector

Author
Ingo Thomsen, tested

Definition at line 159 of file Operators.hh.

References BIAS::Vector2< T >::Divide().

template<class T >
bool operator< ( const Vector2< T > &  a,
const Vector2< T > &  b 
)
related
Author
Dennis Herzog, 2005-07-27

Definition at line 321 of file Operators.hh.

template<class T>
std::ostream & operator<< ( std::ostream &  os,
const Vector2< char > &  vec 
)
related

Output with streams Specialized for uc numerical display.

Author
Jan Woetzel

Definition at line 696 of file Vector2.hh.

References BIAS::IsConsoleStream().

template<class T >
std::ostream & operator<< ( std::ostream &  os,
const Vector2< T > &  vec 
)
related

Output with streams.

Author
Jan Woetzel

Definition at line 737 of file Vector2.hh.

References BIAS::IsConsoleStream().

template<class T >
bool operator<= ( const Vector2< T > &  a,
const Vector2< T > &  b 
)
related
Author
Dennis Herzog, 2005-07-27
Dennis Herzog, 2005-07-27

Definition at line 315 of file Operators.hh.

template<class T >
bool operator> ( const Vector2< T > &  a,
const Vector2< T > &  b 
)
related
Author
Dennis Herzog, 2005-07-27

Definition at line 333 of file Operators.hh.

template<class T >
bool operator>= ( const Vector2< T > &  a,
const Vector2< T > &  b 
)
related
Author
Dennis Herzog, 2005-07-27

Definition at line 327 of file Operators.hh.

template<class T>
std::istream & operator>> ( std::istream &  is,
Vector2< char > &  vec 
)
related

Input with streams.

Author
Jan Woetzel (03/01/2002)

Definition at line 763 of file Vector2.hh.

References BIAS::Vector2< T >::GetData(), and BIAS::Vector2< T >::Size().

template<class T >
std::istream & operator>> ( std::istream &  is,
Vector2< T > &  vec 
)
related

Input with streams.

Author
Jan Woetzel (03/01/2002)

Definition at line 807 of file Vector2.hh.

References BIAS::Vector2< T >::GetData(), and BIAS::Vector2< T >::Size().

Member Data Documentation

template<class T>
T BIAS::Vector2< T >::data_[VECTOR2SIZE]
protected

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