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

  PUBLIC
LinearSums2dC::LinearSums2dC(void)
LinearSums2dC::LinearSums2dC(const LinearSums2dC &)
LinearSums2dC::SetZero(void)
LinearSums2dC::operator+=(const Point2dC &)
LinearSums2dC::operator-=(const Point2dC &)
LinearSums2dC::Add(const RealT,const RealT)
LinearSums2dC::Remove(const RealT,const RealT)
LinearSums2dC::N(void) const
LinearSums2dC::MeanX(void) const
LinearSums2dC::MeanY(void) const
LinearSums2dC::VarX(void) const
LinearSums2dC::VarY(void) const
LinearSums2dC::Centroid(void) const
LinearSums2dC::SlopeY(void) const
LinearSums2dC::SlopeX(void) const
LinearSums2dC::InterceptY(void) const
LinearSums2dC::InterceptX(void) const
LinearSums2dC::Angle(void) const
LinearSums2dC::LineABCy(void) const
LinearSums2dC::LineABCx(void) const
LinearSums2dC::UseLineABCx(void) const
LinearSums2dC::LineABCxy(void) const
LinearSums2dC::MinimumVolume(void) const
LinearSums2dC::Correlation(void) const
LinearSums2dC::operator<<(ostream &,const LinearSums2dC &)
LinearSums2dC::operator>>(istream &,LinearSums2dC &)
LinearSums2dC::Add(const LinearSums2dC::RealT,const LinearSums2dC::RealT)
LinearSums2dC::Remove(const LinearSums2dC::RealT,const LinearSums2dC::RealT)
LinearSums2dC
 
The class LinearSums2dC serves for computation of linear dependences in 2D space.
 
include "amma/LinearS2.hh"
User Level:Default
Library:Mag2
Example:exMat2d.cc
Section:Geometry.2-D
In Scope:std

Typedefs:

typedef StdTypeC::RealT RealT;

Variables:
LongIntT n;

RealT sumX;

RealT sumY;

RealT sumXX;

RealT sumXY;

RealT sumYY;

Methods:
LinearSums2dC()
The zero sums.

LinearSums2dC(const LinearSums2dC & sums)
Copy constructor.
Updating. ---------

void SetZero()
Initializies the sums.

const LinearSums2dC & operator+=(const Point2dC & p)
Adds another point to the sums.

const LinearSums2dC & operator-=(const Point2dC & p)
Subtracts the point from the sums.

const LinearSums2dC & Add(const RealT x,const RealT y)
Adds another point to the sums.

const LinearSums2dC & Remove(const RealT x,const RealT y)
Removes the point from the sums.
Computation of statistics. --------------------------

LongIntT N() const
Returns the number of data have been entered into the sums.

RealT MeanX() const
Returns the mean value of the x.

RealT MeanY() const
Returns the mean value of the y.

RealT VarX() const
Returns the variance of the x.

RealT VarY() const
Returns the variance of the y.

Point2dC Centroid() const
Returns the point with the mininum distance from this set of points.
The used criterion is Sum((Y-y)^2+(X-x)^2) -> min.

RealT SlopeY() const
Returns the slope dY/dX. The used criterion is Sum(Y-y)^2 -> min.
It means dY/dX = k, where y = k*x+q.

RealT SlopeX() const
Returns the slope dX/dY. The used criterion is Sum(X-x)^2 -> min.
It means dX/dY = k, where x = k*y+q.

RealT InterceptY() const
Returns the estimate of q, if y = k*x+q.
The used criterion is Sum(Y-y)^2 -> min.

RealT InterceptX() const
Returns the estimate of q, if y = k*y+q.
The used criterion is Sum(X-x)^2 -> min.

RealT Angle() const
If points form a line, estimate its angle.
Returns an angle in randians.

LineABC2dC LineABCy() const
Returns the equation of the line. The used criterion is
Sum(Y-y)^2 -> min.

LineABC2dC LineABCx() const
Returns the equation of the line. The used criterion is
Sum(X-x)^2 -> min.

BooleanT UseLineABCx() const
Which is better LineABCx() or LineABCy ?

LineABC2dC LineABCxy() const
Return the best fit of LineABCx, LineABCy.
This may change to Sum(Y-y)^2 + Sum(X-x)^2 -> min in the future.

RealT MinimumVolume() const
Returns the determinant of the centralized covariance matrix.
The determinant is propotional to the volume of the minimum elipsoid containing data.

RealT Correlation() const
Returns the value of the correlation between X and Y.

ostream & operator<<(ostream & outS,const LinearSums2dC & sums)

istream & operator>>(istream & inS,LinearSums2dC & sums)

const LinearSums2dC & Add(const LinearSums2dC::RealT x,const LinearSums2dC::RealT y)

const LinearSums2dC & Remove(const LinearSums2dC::RealT x,const LinearSums2dC::RealT y)


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