25 #include <Base/Math/Vector2.hh>
26 #include <Base/Math/Vector.hh>
27 #include <Base/Math/Matrix2x2.hh>
28 #include <Base/Math/Utils.hh>
29 #include <Base/Common/W32Compat.hh>
44 BIASASSERT(v.
size() == VECTOR2SIZE);
56 BIASERR(
"CoordPolarToEuclidean not implemented for this template type T - but e.g. for double");
70 const double r = (*this)[0];
71 const double phi = (*this)[1];
74 const double xx( r * cos(phi) );
75 const double yy( r * sin(phi) );
86 BIASERR(
"CoordEuclideanToPolar not implemented for this template type T - but e.g. for double");
100 const double x = (*this)[0];
101 const double y = (*this)[1];
104 const double r( NormL2() );
122 const double phi( atan2(y,x) );
134 std::ifstream fs( filename.c_str() );
149 std::ofstream fs( filename.c_str() );
167 template class BIASMathBase_EXPORT BIAS::Vector2<type>;
bool Load(const std::string &filename)
method to load directly from a given filename.
class for column vectors with arbitrary size
BIAS::Vector2< T > CoordEuclideanToPolar() const
coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x...
BIAS::Vector2< T > CoordPolarToEuclidean() const
coordinate transform compute the euclidean coord p=(x,y) for (this) given polarcoord (radius...
class Vector2 contains a Vector of dim.
bool Save(const std::string &filename) const
method to save directly to a given filename.
Vector2()
default constructor