User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Statistics - FMeanC<unsigned int N>
 

  PUBLIC
FMeanC::FMeanC(void)
FMeanC::FMeanC(const SArray1dC> &)
FMeanC::FMeanC(const FVectorC &)
FMeanC::FMeanC(SizeT,const FVectorC &)
FMeanC::Copy(void) const
FMeanC::Number(void) const
FMeanC::Mean(void) const
FMeanC::Mean(void)
FMeanC::SetZero(void)
FMeanC::Set(SizeT,const FVectorC &)
FMeanC::operator +=(const FVectorC &)
FMeanC::operator -=(const FVectorC &)
FMeanC::operator +=(const FMeanC &)
FMeanC::operator -=(const FMeanC &)
FVectorC::FVectorC(const TFPointC &)
FVectorC::IsReal(void) const
FVectorC::Magnitude(void) const
FVectorC::EuclidDistance(const TFVectorC &) const
FVectorC::Unit(void) const
FVectorC::MakeUnit(void)
TFVectorC::Size(void) const
TFVectorC::Contains(UIntT) const
TFVectorC::operator [](UIntT)
TFVectorC::operator [](UIntT) const
TFVectorC::operator ==(const TFVectorC &) const
TFVectorC::operator !=(const TFVectorC &) const
TFVectorC::Fill(const DataT &)
TFVectorC::Abs(void) const
TFVectorC::operator +=(const TFVectorC &)
TFVectorC::operator -=(const TFVectorC &)
TFVectorC::operator *=(const TFVectorC &)
TFVectorC::operator /=(const TFVectorC &)
TFVectorC::operator +(const TFVectorC &) const
TFVectorC::operator -(const TFVectorC &) const
TFVectorC::operator *(const TFVectorC &) const
TFVectorC::operator /(const TFVectorC &) const
TFVectorC::operator -(void) const
TFVectorC::operator *=(const DataT &)
TFVectorC::operator /=(const DataT &)
TFVectorC::operator *(const DataT &) const
TFVectorC::operator /(const DataT &) const
TFVectorC::Dot(const TFVectorC &) const
TFVectorC::OuterProduct(const TFVectorC &,TFMatrixC &) const
TFVectorC::OuterProduct(TFMatrixC &) const
TFVectorC::Limit(const DataT &,const DataT &)
TFVectorC::MaxValueDistance(const TFVectorC &) const
TFVectorC::CityBlockDistance(const TFVectorC &) const
TFVectorC::SqrEuclidDistance(const TFVectorC &) const
TFVectorC::Sum(void) const
TFVectorC::SumSqr(void) const
TFVectorC::T(void) const
TFVectorC::operator >>(istream &,TFVectorC &)
TFVectorC::operator <<(ostream &,const TFVectorC &)
TFVectorC::operator >>(BinIStreamC &,TFVectorC &)
TFVectorC::operator <<(BinOStreamC &,const TFVectorC &)

   FMeanC<unsigned int N>   
 
Mean in N-D space
 
include "Ravl/FMean.hh"
Created:26/05/1994 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Comments:
The class MeanNdC serves for computation of the mean of a set of N-dimensional vectors.

Parent Classes: Variables:
Methods:
FMeanC()
Default constructor.

FMeanC(const SArray1dC<FVectorC<N>> & vecs)
Caluclate the mean of an array of vectors.
All the vectors must have the same size, if the array is empty a zero mean is generated.

FMeanC(const FVectorC<N> & mean)
Create a mean with a single point.
Creates the mean vector representing the data set containing just one data point. This object is attached to the memory of 'point'.

FMeanC(SizeT n,const FVectorC<N> & mean)
Create with a mean an a number of points.
Creates the mean vector representing the data set containing 'n' points and represented by the 'mean'. This object is attached to the memory of 'mean'.

FMeanC<N> Copy() const
Copy this mean
Returns a new physical copy of this object. Information about an object ---------------------------

SizeT Number() const
Returns number of points which were added into the object.

const FVectorC<N> & Mean() const
Returns the current value of the mean.

FVectorC<N> & Mean()
Access the mean vector.

Object modification
void SetZero()
Reset all the counters to zero.

void Set(SizeT n,const FVectorC<N> & m)
Sets the new content of mean object.
It will represent 'n' points with the mean location 'm'.

FMeanC<N> & operator +=(const FVectorC<N> & point)
Adds a point to the set.

FMeanC<N> & operator -=(const FVectorC<N> & point)
Removes a point from the set.
Be carefull to remove a point which was already added to the set, otherwise the representation will not describe a real set.

FMeanC<N> & operator +=(const FMeanC<N> & mean)
Adds the whole set of points represented by the mean object 'm'.

FMeanC<N> & operator -=(const FMeanC<N> & mean)
Removes the whole set of points represented by the mean object 'm'.
Be carefull to remove points which was already added to the set, otherwise the representation will not describe a real set.

#include "Ravl/FVector.hh"
explicit FVectorC(const TFPointC<N> & oth)
Base constructor.

bool IsReal() const
Test if matrix only contains real values.
This will return false if either nan's (Not an number) or infinite values are found.

RealT Magnitude() const
Calculate the magintude of the vector.

RealT EuclidDistance(const TFVectorC<RealT,N> & i) const
Returns the magintude of the difference between the two vectors.

FVectorC<N> Unit() const
Create a unit vector with the same direction.

const FVectorC<N> & MakeUnit()
Make this a unit vector.
In place operation.

#include "Ravl/TFVector.hh"
UIntT Size() const
Get size of array
Used by some templates.

bool Contains(UIntT i) const
Test if array contains index i·

RealT & operator [](UIntT ind)
Access item.

const RealT & operator [](UIntT ind) const
Access item.

bool operator ==(const TFVectorC<RealT,N> & ind) const
is equal

bool operator !=(const TFVectorC<RealT,N> & ind) const
is not equal

void Fill(const RealT & dat)
Fill array with value 'dat'.

TFVectorC<RealT,N> Abs() const
Get an vector with Abs(x) run on all it values.

const TFVectorC<RealT,N> & operator +=(const TFVectorC<RealT,N> & ind)
Add an array to this one, inplace.

const TFVectorC<RealT,N> & operator -=(const TFVectorC<RealT,N> & ind)
Returns this index multiplied by index 'ind' item by item.

const TFVectorC<RealT,N> & operator *=(const TFVectorC<RealT,N> & ind)
Multiplies this index by index 'ind' item by item.

const TFVectorC<RealT,N> & operator /=(const TFVectorC<RealT,N> & ind)
Divides this index by index 'ind' item by item.

TFVectorC<RealT,N> operator +(const TFVectorC<RealT,N> & ind) const
Adds this index and 'ind'.

TFVectorC<RealT,N> operator -(const TFVectorC<RealT,N> & ind) const
Subtracts index 'ind' from this index.

TFVectorC<RealT,N> operator *(const TFVectorC<RealT,N> & ind) const
Returns this object multiplied by index 'ind' item by item.

TFVectorC<RealT,N> operator /(const TFVectorC<RealT,N> & ind) const
Returns this object devided by index 'ind' item by item.

TFVectorC<RealT,N> operator -() const
Returns opposite elements (unary minus operator).

const TFVectorC<RealT,N> & operator *=(const RealT & alpha)
Multiplies this index by number 'alpha'.

const TFVectorC<RealT,N> & operator /=(const RealT & alpha)
Divides this index by number 'alpha'.

TFVectorC<RealT,N> operator *(const RealT & alpha) const
Returns this object mutliplied by alpha.

TFVectorC<RealT,N> operator /(const RealT & alpha) const
Returns this object devided by alpha.

RealT Dot(const TFVectorC<RealT,N> & oth) const
Calculate the dot product of this and 'oth' vector.

TFMatrixC<RealT,N,N> & OuterProduct(const TFVectorC<RealT,N> & av,TFMatrixC<RealT,N,N> & result) const
Calculate the outer product of this vector with av.
The output is assigned to 'result'. A reference to 'result' is returned.

The implementation is in "Ravl/FMatrix.hh", it must be included to use this function.


TFMatrixC<RealT,N,N> & OuterProduct(TFMatrixC<RealT,N,N> & result) const
Calculate the outer product of this vector with itsself.
The output is assigned to 'result'. A reference to 'result' is returned.

The implementation is in "Ravl/FMatrix.hh", it must be included to use this function.


bool Limit(const RealT & min,const RealT & max)
Limit all values in this vector to between min and max.
Returns true if all values in the vector are between the limits. Distance calculations ---------------------

RealT MaxValueDistance(const TFVectorC<RealT,N> & i) const
Returns the distance of two indexes in maximum value metric.

RealT CityBlockDistance(const TFVectorC<RealT,N> & i) const
Returns the distance of two indexes in absolute value metric.

RealT SqrEuclidDistance(const TFVectorC<RealT,N> & i) const
Returns the distance of two indexes in square Euclid metric.

RealT Sum() const
Calculate the sum of all the vector elements.

RealT SumSqr() const
Calculate the sum of the squares of all the vector elements.

const TFMatrixC<RealT,1,N> & T() const
Transpose vector.
The implementation for this can be found in "Ravl/TFMatrix.hh"

istream & operator >>(istream & in,TFVectorC<RealT,N> & dat)

ostream & operator <<(ostream & in,const TFVectorC<RealT,N> & dat)

BinIStreamC & operator >>(BinIStreamC & in,TFVectorC<RealT,N> & dat)

BinOStreamC & operator <<(BinOStreamC & in,const TFVectorC<RealT,N> & dat)


Maintainer:Radek Marik, Created: 26/05/1994, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002