Basic Image AlgorithmS Library
2.8.0
|
class Vector2 contains a Vector of dim. More...
#include <Base/Math/Vector2.hh>
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... | |
T | 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 () |
T | GetW () const |
T & | GetX () |
read only access functions to use names instead of indizes More... | |
T | GetX () const |
T & | GetY () |
T | 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... | |
T | max (const T a, const T b) const |
T | 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... | |
T | 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... | |
T | Phi () const |
T & | Radius () |
polar form JW More... | |
T | 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... | |
T | 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 | |
T | 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 > | |
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... | |
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)
Definition at line 79 of file Vector2.hh.
typedef T BIAS::Vector2< T >::value_type |
Definition at line 82 of file Vector2.hh.
|
inline |
destructor
Definition at line 88 of file Vector2.hh.
|
inline |
default constructor
Definition at line 94 of file Vector2.hh.
|
inline |
copy constructor
Definition at line 99 of file Vector2.hh.
|
inlineexplicit |
assignment with a constant value for all elements
Definition at line 106 of file Vector2.hh.
|
inline |
constructor with element assigment using explicit values
Definition at line 114 of file Vector2.hh.
|
inlineexplicit |
assignment with an array of values which is copied into this ones class members
Definition at line 124 of file Vector2.hh.
|
inlineexplicit |
constructor with element assignment
Definition at line 131 of file Vector2.hh.
BIAS::Vector2< T >::Vector2 | ( | const Vector< T > & | v | ) |
|
inline |
Addition with a scalar, storing results in destionation vector.
Definition at line 516 of file Vector2.hh.
Referenced by BIAS::operator+(), BIAS::Vector2< T >::operator+(), and BIAS::operator+=().
|
inline |
adding of two vectors, storing the result in destvec
Definition at line 596 of file Vector2.hh.
|
inline |
Addition (in place) of an scalar.
Definition at line 510 of file Vector2.hh.
Referenced by BIAS::operator+=().
|
inline |
in place adding
Definition at line 588 of file Vector2.hh.
|
inline |
Iterator to first component of vector.
Definition at line 160 of file Vector2.hh.
|
inline |
Definition at line 163 of file Vector2.hh.
|
inline |
stl conform interface
Definition at line 201 of file Vector2.hh.
Referenced by BIAS::Interpolator::GetControlPoints().
BIAS::Vector2< double > BIAS::Vector2< double >::CoordEuclideanToPolar | ( | ) | const |
Definition at line 97 of file Vector2.cpp.
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.
Definition at line 84 of file Vector2.cpp.
|
inline |
Definition at line 645 of file Vector2.hh.
BIAS::Vector2< double > BIAS::Vector2< double >::CoordPolarToEuclidean | ( | ) | const |
Definition at line 67 of file Vector2.cpp.
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.
Definition at line 54 of file Vector2.cpp.
|
inline |
Definition at line 631 of file Vector2.hh.
|
inline |
copy the array of vectorsize beginning at *T to this->data_
Definition at line 180 of file Vector2.hh.
|
inline |
|
inline |
|
inline |
Division with a scalar, storing results in destination vector.
Definition at line 562 of file Vector2.hh.
Referenced by BIAS::Vector2< T >::operator/().
|
inline |
Definition at line 572 of file Vector2.hh.
|
inline |
Division (in place) of an scalar.
Definition at line 549 of file Vector2.hh.
Referenced by BIAS::CameraViewController::MotionTranslation(), BIAS::CameraViewController::MotionTranslationCoplanar(), and BIAS::operator/=().
|
inline |
elementwise Division (in place) by a vector
Definition at line 555 of file Vector2.hh.
|
inline |
Definition at line 383 of file Vector2.hh.
|
inline |
Definition at line 393 of file Vector2.hh.
|
inline |
multiply two vectors elementwise, storing the result in destvec
Definition at line 367 of file Vector2.hh.
|
inline |
Definition at line 374 of file Vector2.hh.
|
inline |
Iterator pointing to one element after the last vector element.
Definition at line 169 of file Vector2.hh.
|
inline |
Definition at line 172 of file Vector2.hh.
|
inline |
Definition at line 617 of file Vector2.hh.
|
inline |
get the data pointer the member function itself is const (before {..}) because it doesn't change the this object.
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().
|
inline |
Definition at line 240 of file Vector2.hh.
|
inline |
Definition at line 227 of file Vector2.hh.
|
inline |
Definition at line 295 of file Vector2.hh.
|
inline |
Definition at line 306 of file Vector2.hh.
|
inline |
read only access functions to use names instead of indizes
Definition at line 289 of file Vector2.hh.
Referenced by BIAS::NurbsSurface::SetCTRLPointsToRandom().
|
inline |
Definition at line 300 of file Vector2.hh.
|
inline |
Definition at line 292 of file Vector2.hh.
Referenced by BIAS::CameraViewController::MotionTranslationForward(), and BIAS::NurbsSurface::SetCTRLPointsToRandom().
|
inline |
Definition at line 303 of file Vector2.hh.
|
inline |
Definition at line 206 of file Vector2.hh.
|
inline |
return euclidean length
Definition at line 435 of file Vector2.hh.
bool BIAS::Vector2< T >::Load | ( | const std::string & | filename | ) |
method to load directly from a given filename.
internally using stream operator
Definition at line 132 of file Vector2.cpp.
|
inline |
Definition at line 346 of file Vector2.hh.
|
inline |
Definition at line 342 of file Vector2.hh.
|
inline |
Multiplication with a scalar, storing results in destionation vector.
Definition at line 542 of file Vector2.hh.
Referenced by BIAS::Vector2< T >::operator*().
|
inline |
Multiplication (in place) of an scalar.
Definition at line 536 of file Vector2.hh.
Referenced by BIAS::operator*=().
|
inline |
Definition at line 441 of file Vector2.hh.
|
inline |
|
inline |
Return the L2 norm: sqrt(a^2 + b^2)
Definition at line 430 of file Vector2.hh.
Referenced by BIAS::ImageBlender::CalcAngleToXAxis(), BIAS::ImageBlenderIncremental::CalcAngleToXAxis_(), BIAS::ImageBlender::CalcAngleToYAxis(), BIAS::ImageBlenderIncremental::CalcAngleToYAxis_(), BIAS::ImageBlender::ComputeCylCamGeometry(), BIAS::ImageBlenderIncremental::ComputeCylCamGeometry_(), and BIAS::ContourDetectorBSpline< StorageType >::GetNormal_().
|
inline |
Comparison operator 'not equal'.
Definition at line 497 of file Vector2.hh.
|
inline |
assignment operator set the vector elementwise to scalar value
Definition at line 249 of file Vector2.hh.
|
inline |
assignment operator
Definition at line 257 of file Vector2.hh.
|
inline |
Comparison operator 'equal'.
Definition at line 490 of file Vector2.hh.
|
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
Definition at line 267 of file Vector2.hh.
|
inline |
access an element of the vector with 0-based indizes.
write allowed
Definition at line 277 of file Vector2.hh.
|
inline |
outer product, constructs a matrix (e.g.
for covariance).
Definition at line 404 of file Vector2.hh.
|
inline |
Definition at line 413 of file Vector2.hh.
|
inline |
polar form JW
Definition at line 332 of file Vector2.hh.
|
inline |
Definition at line 334 of file Vector2.hh.
|
inline |
polar form JW
Definition at line 326 of file Vector2.hh.
|
inline |
Definition at line 328 of file Vector2.hh.
bool BIAS::Vector2< T >::Save | ( | const std::string & | filename | ) | const |
method to save directly to a given filename.
internally using stream operator
Definition at line 147 of file Vector2.cpp.
|
inline |
scalar product of two vectors, storing the result in result
Definition at line 356 of file Vector2.hh.
Referenced by BIAS::CamPoseCalib::AddConstraints2DLine_(), BIAS::ImageBlender::CalcAngleToXAxis(), BIAS::ImageBlenderIncremental::CalcAngleToXAxis_(), BIAS::ImageBlender::CalcAngleToYAxis(), and BIAS::ImageBlenderIncremental::CalcAngleToYAxis_().
|
inline |
Definition at line 360 of file Vector2.hh.
|
inline |
set all elements to a scalar value
Definition at line 190 of file Vector2.hh.
Referenced by BIAS::GeometryGL::DisplayQuadTexCoord2D(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::CameraViewController::InitMembers(), BIAS::ImageCanvasGLBase::InitMembers(), BIAS::TriangleMesh::SimplifyMeshSurface_(), and BIAS::Interpolator::Spline().
|
inline |
set elementwise with given scalar values
Definition at line 215 of file Vector2.hh.
|
inline |
Definition at line 321 of file Vector2.hh.
|
inline |
set (write) access functions to use names instead of indizes
Definition at line 315 of file Vector2.hh.
|
inline |
Definition at line 318 of file Vector2.hh.
|
inline |
Definition at line 196 of file Vector2.hh.
Referenced by BIAS::CameraViewController::InitMembers().
|
inline |
Definition at line 223 of file Vector2.hh.
Referenced by BIAS::Vector2< T >::operator>>(), and BIAS::operator>>().
|
inline |
Definition at line 225 of file Vector2.hh.
Referenced by BIAS::TriangleMesh::SimplifyMeshSurface_(), and BIAS::Interpolator::Spline().
|
inline |
|
inline |
Substraction with a scalar, storing results in destionation vector.
Definition at line 529 of file Vector2.hh.
Referenced by BIAS::Vector2< T >::operator-(), and BIAS::operator-=().
|
inline |
subtracting of two Vectors, storing the result in destvec
Definition at line 612 of file Vector2.hh.
|
inline |
Substraction (in place) of an scalar.
Definition at line 523 of file Vector2.hh.
Referenced by BIAS::operator-=().
|
inline |
in place subtraction
Definition at line 604 of file Vector2.hh.
Multiplication operator with scalar argument, returning new vector
Definition at line 137 of file Operators.hh.
References BIAS::Vector2< T >::Multiply().
Multiplication operator with scalar argument, returning new vector
Definition at line 148 of file Operators.hh.
References BIAS::Vector2< T >::Multiply().
Definition at line 360 of file Operators.hh.
|
related |
Definition at line 674 of file Operators.hh.
|
related |
Definition at line 696 of file Operators.hh.
|
related |
add operator for two Vectors, returning new vector
Definition at line 340 of file Operators.hh.
References BIAS::Vector2< T >::Add().
Definition at line 56 of file Operators.hh.
Substraction operator with scalar argument, returning new vector
Definition at line 115 of file Operators.hh.
References BIAS::Vector2< T >::Sub().
Substraction operator with scalar argument, returning new vector
Definition at line 126 of file Operators.hh.
References BIAS::Vector2< T >::Sub().
|
related |
sub operator for two Vectors, returning new vector
Definition at line 351 of file Operators.hh.
References BIAS::Vector2< T >::Sub().
Division operator with scalar argument, returning new vector
Definition at line 159 of file Operators.hh.
References BIAS::Vector2< T >::Divide().
Definition at line 321 of file Operators.hh.
|
related |
Output with streams Specialized for uc numerical display.
Definition at line 696 of file Vector2.hh.
References BIAS::IsConsoleStream().
|
related |
Definition at line 315 of file Operators.hh.
Definition at line 333 of file Operators.hh.
Definition at line 327 of file Operators.hh.
|
related |
Input with streams.
Definition at line 763 of file Vector2.hh.
References BIAS::Vector2< T >::GetData(), and BIAS::Vector2< T >::Size().
|
related |
Input with streams.
Definition at line 807 of file Vector2.hh.
References BIAS::Vector2< T >::GetData(), and BIAS::Vector2< T >::Size().
|
protected |
Definition at line 677 of file Vector2.hh.
Referenced by BIAS::Vector2< HOMGPOINT1D_TYPE >::Add(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Divide(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Multiply(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator!=(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator==(), and BIAS::Vector2< HOMGPOINT1D_TYPE >::Sub().