Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
Vector2dTC::T(void) const
Vector2dTC::operator*(const Matrix2d2C &) const
Vector2dTC::operator*(const Vector2dC &) const
Vector2dTC::Vector2dTC(const Vector2dC &)
Vector2dC::Dot(const Vector2dC &) const
Vector2dC::Cross(const Vector2dC &) const
Vector2dC::operator+(const Vector2dC &) const
Vector2dC::operator-(const Vector2dC &) const
Vector2dC::operator*(RealT) const
Vector2dC::operator*(const Vector2dC &) const
Vector2dC::operator/(RealT) const
Vector2dC::operator/(const Vector2dC &) const
Vector2dC::operator+=(const Vector2dC &)
Vector2dC::operator-=(const Vector2dC &)
Vector2dC::operator*=(RealT)
Vector2dC::operator/=(RealT)
Vector2dC::SqrNorm(void) const
Vector2dC::Norm(void) const
Vector2dC::Modulus(void) const
Vector2dC::Unit(void) const
Vector2dC::Perpendicular(void) const
Vector2dC::ProjectionSizeInto(const Vector2dC &) const
Vector2dC::ProjectionInto(const Vector2dC &) const
Vector2dC::Angle(void) const
Vector2dC::LineAngle(void) const
Vector2dC::Rotate(AngleT) const
Vector2dC::T(void) const
Vector2dC::ProductT(void) const
Vector2dC::operator>>(istream &,Vector2dC &)
Vector2dC::operator<<(ostream &,const Vector2dC &)
Point2dC::Point2dC(SizeT)
Point2dC::operator=(const Point2dC &)
Point2dC::operator[](IndexT) const
Point2dC::operator[](IndexT)
Point2dC::X(void) const
Point2dC::Y(void) const
Point2dC::X(void)
Point2dC::Y(void)
Point2dC::Point(void) const
Point2dC::Point(void)
Point2dC::operator==(const Point2dC &) const
Point2dC::operator!=(const Point2dC &) const
Point2dC::operator>(const Point2dC &) const
Point2dC::operator<(const Point2dC &) const
Point2dC::operator>=(const Point2dC &) const
Point2dC::operator<=(const Point2dC &) const
Point2dC::OneBigger(const Point2dC &) const
Point2dC::SetZero(void)
Point2dC::Set(const Point2dC &)
Point2dC::Set(const CoordT,const CoordT)
Point2dC::SetMinimum(const Point2dC &)
Point2dC::SetMaximum(const Point2dC &)
Point2dC::MinIndex(void) const
Point2dC::MaxIndex(void) const
Point2dC::AbsMinIndex(void) const
Point2dC::AbsMaxIndex(void) const
Point2dC::Min(void) const
Point2dC::Max(void) const
Point2dC::operator+=(const Point2dC &)
Point2dC::operator-=(const Point2dC &)
Point2dC::operator*=(const Point2dC &)
Point2dC::operator/=(const Point2dC &)
Point2dC::operator*=(const RealT)
Point2dC::operator/=(const RealT)
Point2dC::operator+(const Point2dC &) const
Point2dC::operator-(const Point2dC &) const
Point2dC::operator*(const Point2dC &) const
Point2dC::operator/(const Point2dC &) const
Point2dC::operator*(const RealT) const
Point2dC::operator/(const RealT) const
Point2dC::operator+(const Vector2dC &) const
Point2dC::operator&(const Point2dC &) const
Point2dC::Translation(const Point2dC &) const
Point2dC::SqrEuclidDistance(const Point2dC &) const
Point2dC::EuclidDistance(const Point2dC &) const
Point2dC::EDistanceFromOrigin(void) const
Point2dC::CosAngle(const Point2dC &,const Point2dC &) const
Point2dC::Angle(const Point2dC &,const Point2dC &) const
Point2dC::AngleOrigin(const Point2dC &) const
Point2dC::MidPoint(const Point2dC &) const
Point2dC::Center(const Point2dC &) const
Point2dC::N(void) const
Point2dC::AbsDistance(const Point2dC &) const
Point2dC::MahalanobisDistance(const Point2dC &,const Matrix2d2C &)
Point2dC::Sum(void) const
Point2dC::SumAbs(void) const
Point2dC::Sqrt(void)
Point2dC::Abs(void)
Point2dC::Normalize(void)
Point2dC::NormalizeSum(void)
Point2dC::MakeUnit(const IndexT)
Point2dC::SlopeAndIntercept(const Point2dC &) const
Point2dC::SlopeAndInterceptY(const Point2dC &) const
Point2dC::Bisector(const Point2dC &) const
Point2dC::Area2(const Point2dC &,const Point2dC &) const
Point2dC::IsToLeft(const Point2dC &,const Point2dC &) const
Point2dC::IsToLeftOn(const Point2dC &,const Point2dC &) const
Point2dC::IsCollinear(const Point2dC &,const Point2dC &) const
Point2dC::IsExactlyCollinear(const Point2dC &,const Point2dC &) const
Point2dC::IsProperIntersection(const Point2dC &,const Point2dC &,const Point2dC &) const
Point2dC::IsBetween(const Point2dC &,const Point2dC &) const
Point2dC::IsIntersected(const Point2dC &,const Point2dC &,const Point2dC &) const
Point2dC::FixAlmostZero(void)
Point2dC::SetZeroDistance(RealT)
Point2dC::IsAlmostZero(RealT)
Point2dC::SetRelZero(RealT)
Point2dC::IsRelZero(RealT)
Point2dC::RAbs(RealT)
Point2dC::operator>>(istream &,Point2dC &)
Point2dC::Set(const RealT,const RealT)
Vector2dTC
 
include "amma/Vector2d.hh"
User Level:Default
Library:Mag2
Example:ex_kutta.cc
Section:Geometry.2-D Basic Types.Numerical.Specialised
In Scope:std

Comments:
------------------------------------------------------------------- ******** Vector2dTC *********************************************** -------------------------------------------------------------------

Parent Classes: Methods:
Vector2dC T() const

Vector2dTC operator*(const Matrix2d2C & matrix) const

RealT operator*(const Vector2dC & vector) const

Vector2dTC(const Vector2dC & vector)

RealT Dot(const Vector2dC & v) const
Returns the value of the scalar product of 'this' vector and the vector 'v'.

RealT Cross(const Vector2dC & v) const
Returns the third coordinate of the cross product of this vector and the vector 'v'.

Vector2dC operator+(const Vector2dC & v) const
Returns the sum of 2 vectors.

Vector2dC operator-(const Vector2dC & v) const
Returns the difference of 2 vectors.

Vector2dC operator*(RealT lambda) const
Multiplies both coordinates of the vector by the scale 'lambda' and returns the result.

Vector2dC operator*(const Vector2dC & v) const
Returns the vector which coordinates are the results of multiplication item by item of this vector and the vector 'v'.

Vector2dC operator/(RealT lambda) const
Divides both coordinates of the vector by the scale 'lambda'' and returns the result.

Vector2dC operator/(const Vector2dC & v) const
Returns the points which coordinates are results of division of this vector and 'v' point item by item.

Vector2dC & operator+=(const Vector2dC & v)
Adds to this vector another vector 'v'.

Vector2dC & operator-=(const Vector2dC & v)
Subtracts from this vector the vector 'v'.

Vector2dC & operator*=(RealT lambda)
Multiplies both coordinates of the vector by the scale 'lambda'.

Vector2dC & operator/=(RealT lambda)
Divides both coordinates of the vector by the scale 'lambda'.

RealT SqrNorm() const
Returns the square of the norm.

RealT Norm() const
Returns the Euclidian size of the vector.

RealT Modulus() const
Returns the Euclidian size of the vector.

Vector2dC Unit() const
Returns the unit vector of this vector.

Vector2dC Perpendicular() const
Return the perpendicular vector rotated to the left from the original one.

RealT ProjectionSizeInto(const Vector2dC & v) const
Returns the size of the projection of this vector into the vector 'v'.

Vector2dC ProjectionInto(const Vector2dC & v) const
Returns the projection of this vector into the vector 'v'.

AngleT Angle() const
Returns the oriented angle (rad) from the axes x in the range -PI to PI.

AngleT LineAngle() const
Returns the oriented angle (rad) from the axes x in the range -PI/2 to PI/2.

Vector2dC Rotate(AngleT ang) const
Get a new vector rotated by ang radians.

Vector2dTC T() const
Returns the row vector with the same coordinates as this vector has.

Matrix2d2C ProductT() const
Returns the matrix which is the result of the multiplication x*x.T().

istream & operator>>(istream & inS,Vector2dC & vector)

ostream & operator<<(ostream & outS,const Vector2dC & vector)

#include "amma/Point2d.hh"
explicit Point2dC(SizeT dim)
Construct a new 2-d point.
For compatability with N-D Points.

const Point2dC & operator=(const Point2dC & point)
Assigment of point.
Access to the coordinates. --------------------------

const CoordT & operator[](IndexT i) const
Returns the value of the (i+1)-th coordinate.

CoordT & operator[](IndexT i)
Access the value of the (i+1)-th coordinate.

const CoordT & X() const
Returns the value of the 1-st coordinate.

const CoordT & Y() const
Returns the value of the 2-st coordinate.

CoordT & X()
Access the value of the 1-st coordinate.

CoordT & Y()
Access the value of the 2-nd coordinate.

const Point2dC & Point() const
Access to this constant object.

Point2dC & Point()
Access to the point.
Logical conditions. -------------------

BooleanT operator==(const Point2dC & point) const
Returns TRUE if 2 points are the same point.
Two points are claimed to be same iff their relative distance error is small (under 'relZero' threshold). If both points are close to the origin of the coordinate system, their absolute distance error is compared to 'zeroDistance'.

BooleanT operator!=(const Point2dC & point) const
Returns TRUE if 2 points are different.
2 points are different iff they are not equal in the sense of the operator '=='.

BooleanT operator>(const Point2dC & point) const
Returns TRUE if both coordinates are bigger than the coordinates of the point.

BooleanT operator<(const Point2dC & point) const
Returns TRUE if both coordinates are smaller than the coordinates of the point.

BooleanT operator>=(const Point2dC & point) const
Returns TRUE if both coordinates are bigger or exactly equal to the coordinates of the point.

BooleanT operator<=(const Point2dC & point) const
Returns TRUE if both coordinates are smaller or exactly equal to the coordinates of the point.

BooleanT OneBigger(const Point2dC & point) const
Returns TRUE if one coordinate is bigger then the related one of the point.
Setting of the coordinates. ---------------------------

Point2dC & SetZero()
Sets both coordinates to be 0.

void Set(const Point2dC & point)
Sets both coordinates according to the values of 'point'.

void Set(const CoordT xCoor,const CoordT yCoor)
Sets the 1-st coordinate to be 'xCoor' and the 2nd one to be 'yCoor'.

Point2dC & SetMinimum(const Point2dC & point)
Sets the point coordinates to minimal value from both points.

Point2dC & SetMaximum(const Point2dC & point)
Sets the point coordinates to maximal value from both points.
Information about extrems. --------------------------

IndexT MinIndex() const
Returns the index of the minimum coordinate.

IndexT MaxIndex() const
Returns the index of the maximum coordinate.

IndexT AbsMinIndex() const
Returns the index of the minimum coordinate in absolute value.

IndexT AbsMaxIndex() const
Returns the index of the maximum coordinate in absolute value.

CoordT Min() const
Returns the minimum coordinate.

CoordT Max() const
Returns the maximum coordinate.
Arithmetical operations. ------------------------

const Point2dC & operator+=(const Point2dC & point)
Adds the values of the coordinates of the 'point' to this point.

const Point2dC & operator-=(const Point2dC & point)
Subtracts the values of the coordinates of the 'point' from this point.

const Point2dC & operator*=(const Point2dC & point)
Multiplies items by point items.

const Point2dC & operator/=(const Point2dC & point)
Divides items by point items.

const Point2dC & operator*=(const RealT alpha)
Multiplies both coordinates by 'alpha'.

const Point2dC & operator/=(const RealT alpha)
Divides both coordinates by 'alpha'.

Point2dC operator+(const Point2dC & point) const
Returns the point which is the sum of this point and the 'point'.

Vector2dC operator-(const Point2dC & p) const
Returns the difference between 2 points.

Point2dC operator*(const Point2dC & v) const
Returns the points which coordinates are results of multiplication of this point and 'v' points item by item.

Point2dC operator/(const Point2dC & v) const
Returns the points which coordinates are results of division of this point and 'v' points item by item.

Point2dC operator*(const RealT alpha) const
Returns the point which coordinates are multiplied by 'alpha'.

Point2dC operator/(const RealT alpha) const
Returns the point which coordinates are divided by 'alpha'.

Point2dC operator+(const Vector2dC & v) const
Returns the point which is determined by A+v, where A is this point.

RealT operator&(const Point2dC & p) const
Returns the sum X()*p.X() + Y()*p.Y().
In 2 dimensional Euclidian vector space the result is equivalent to dot product of 2 vectors. Euclidian geometry. -------------------

Point2dC Translation(const Point2dC & newOrigin) const
Returns the point with coordinates related to the new origin 'newOrigin'.

RealT SqrEuclidDistance(const Point2dC & point) const
Returns the square of the Euclid distance between two points.

RealT EuclidDistance(const Point2dC & point) const
Returns the Euclid distance between two points.

RealT EDistanceFromOrigin() const
Returns the Euclid distance from the origin of coordinate system.

CosAngleT CosAngle(const Point2dC & m,const Point2dC & b) const
Returns the cosinus of the angle (this point, m, b).

AngleT Angle(const Point2dC & m,const Point2dC & b) const
Returns the angle (this point, m, b).
The angle in the range 0 to PI is not oriented.

AngleT AngleOrigin(const Point2dC & p) const
Returns the angle in rad between points 'this point', (0,0,0), and the point 'p'.
The angle in the range 0 to PI is not oriented.

Point2dC MidPoint(const Point2dC & p) const
Returns the point which is in the middle of this point and the point 'p'.

Point2dC Center(const Point2dC & point) const
Returns the point which is in the middle of 2 points.
Useful functions with points. -----------------------------

SizeT N() const
Returns the number of coordinates of this point.

RealT AbsDistance(const Point2dC & point) const
Returns the block distance between this point and 'point'.

RealT MahalanobisDistance(const Point2dC & mean,const Matrix2d2C & invCov)
Returns the Mahalanobis distance from the 'mean'. The 'invCov' is the inversion of the covariance matrix.

CoordT Sum() const
Returns the sum of coordinates.

CoordT SumAbs() const
Returns the sum of absolute value of coordinates.

Point2dC & Sqrt()
Changes all coordinates into their square root values.

Point2dC & Abs()
Changes all coordinates into their absolute values.

Point2dC & Normalize()
Scales the coordinates of the point to have the distance from the origin equal to 1.
The point is supposed to be different from the origin.

Point2dC & NormalizeSum()
Scales the coordinates of the point to have unit sum.
The point is supposed to be different from the origin.

Point2dC & MakeUnit(const IndexT i)
Scales the coordinates of the point that the i-th coordinate will be equal to 1.
The range of the index i is not checked. Line characteristics --------------------

Point2dC SlopeAndIntercept(const Point2dC & p) const
Returns the slope and the intercept according to the axis x of the line passing through
this point and the point p. The slope is the X() coordinate and the intercept is the Y() coordinate of the result point representing the line. The function does not check the singular case if both X() coordinate are equal.

Point2dC SlopeAndInterceptY(const Point2dC & p) const
Returns the slope and the intercept according to the axis y of the line passing through
this point and the point p. The slope is the X() coordinate and the intercept is the Y() coordinate of the result point representing the line. The function does not check the singular case if both X() coordinate are equal.

LineABC2dC Bisector(const Point2dC & point) const
Returns the line which is the bisector of both points.
Relative position of points ---------------------------

RealT Area2(const Point2dC & second,const Point2dC & third) const
Returns twice the signed area of the triangle determined by this, the second, and the third points.
Positive if 'this', 'second', 'third' are oriented counter-clockwise, and negative if clockwise. Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 19-20

BooleanT IsToLeft(const Point2dC & from,const Point2dC & to) const
Returns TRUE if 'this' point is to the left of the directed line ('from', 'to') and not on this line.
Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 30-31

BooleanT IsToLeftOn(const Point2dC & from,const Point2dC & to) const
Returns TRUE if 'this' point is to the left of or on the directed line ('from', 'to').
Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 30-31

BooleanT IsCollinear(const Point2dC & p1,const Point2dC & p2) const
Returns TRUE if 'this' point is collinear with the points 'p1' and 'p2'.
Three points are collinear iff the smallest relative deviation of a point from the line created by the other points is smaller than 'relZero'.

BooleanT IsExactlyCollinear(const Point2dC & p1,const Point2dC & p2) const
Returns TRUE if 'this' point is collinear with the points 'p1' and 'p2'.
Three points are collinear iff the area of the created triangle is zero. Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 30-31

BooleanT IsProperIntersection(const Point2dC & this2,const Point2dC & second1,const Point2dC & second2) const
Returns TRUE iff the line segment (this, this2) properly intersects the line segment (second1, second2): they share a point interior to both segments.
Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 32-33

BooleanT IsBetween(const Point2dC & a,const Point2dC & b) const
Returns TRUE iff (*this, a, b) are collinear and
:'this' point lies on the closed segment . Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 33-34

BooleanT IsIntersected(const Point2dC & this2,const Point2dC & second1,const Point2dC & second2) const
Returns TRUE iff segments and intersect, properly or improperly (one endpoint of one segment lies between the two endpoints of the other segment.
Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 33-34 Computational precision. ------------------------

void FixAlmostZero()
If the absolute value of a coordinate is smaller than zeroDistance the function sets the coordinate to be zero.

RealT SetZeroDistance(RealT zero)
Sets the precision of the test of zero distance of points.
The function returns the previous value.

BooleanT IsAlmostZero(RealT a)
Returns TRUE if 'a' is smaller or equal to zeroDistance.

RealT SetRelZero(RealT zero)
Sets the precision of the relative error test.
The function returns the previous value.

BooleanT IsRelZero(RealT a)
Returns TRUE if 'a' is smaller than or equal to 'relZero'.

RealT RAbs(RealT t)
Returns the absolute value of the parameter t.

istream & operator>>(istream & inS,Point2dC & point)

void Set(const RealT xCoor,const RealT yCoor)


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001