User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Statistics - Histogram - RealHistogram1dC
 

  PUBLIC
RealHistogram1dC::RealHistogram1dC(void)
RealHistogram1dC::RealHistogram1dC(RealT,RealT,UIntT)
RealHistogram1dC::RealHistogram1dC(RealT,RealT,const SArray1dC &)
RealHistogram1dC::Scale(void) const
RealHistogram1dC::Offset(void) const
RealHistogram1dC::Bin(RealT) const
RealHistogram1dC::MidBin(IndexC) const
RealHistogram1dC::Reset(void)
RealHistogram1dC::Vote(RealT)
RealHistogram1dC::CheckVote(RealT)
RealHistogram1dC::TotalVotes(void) const
RealHistogram1dC::Information(void) const
RealHistogram1dC::Energy(void) const
RealHistogram1dC::MeanVariance(void) const
SArray1dC::Copy(void) const
SArray1dC::Copy(UIntT) const
SArray1dC::CopyFrom(const Slice1dC &)
SArray1dC::operator =(const SArray1dC &)
SArray1dC::operator +(const SArray1dC &) const
SArray1dC::operator -(const SArray1dC &) const
SArray1dC::operator *(const SArray1dC &) const
SArray1dC::operator /(const SArray1dC &) const
SArray1dC::operator *(const DataT &) const
SArray1dC::operator /(const DataT &) const
SArray1dC::operator +(const DataT &) const
SArray1dC::operator -(const DataT &) const
SArray1dC::operator +=(const SArray1dC &)
SArray1dC::operator -=(const SArray1dC &)
SArray1dC::operator *=(const SArray1dC &)
SArray1dC::operator /=(const SArray1dC &)
SArray1dC::operator +=(const DataT &)
SArray1dC::operator -=(const DataT &)
SArray1dC::operator *=(const DataT &)
SArray1dC::operator /=(const DataT &)
SArray1dC::Sum(void) const
SArray1dC::SumSqr(void) const
SArray1dC::SArray1d(void) const
SArray1dC::SArray1d(void)
SArray1dC::Slice1d(void)
SArray1dC::Append(const SArray1dC &)
SArray1dC::Join(const SArray1dC &) const
SArray1dC::From(UIntT)
SArray1dC::From(UIntT,UIntT)
SArray1dC::After(UIntT)
SArray1dC::Buffer(void)
SArray1dC::Buffer(void) const
SArray1dC::Sort(void)
SArray1dC::operator ==(const SArray1dC &)
SArray1dC::Hash(void) const
SArray1dC::DataStart(void) const
SizeBufferAccessC::operator =(DataT *)
SizeBufferAccessC::DataStart(void) const
SizeBufferAccessC::Size(void) const
SizeBufferAccessC::Limits(void) const
SizeBufferAccessC::Range(void) const
SizeBufferAccessC::IMin(void) const
SizeBufferAccessC::IMax(void) const
SizeBufferAccessC::operator [](const IndexC) const
SizeBufferAccessC::operator [](const IndexC)
SizeBufferAccessC::SAccess(void) const
SizeBufferAccessC::IsEmpty(void) const
SizeBufferAccessC::Contains(IndexC) const
SizeBufferAccessC::ShrinkHigh(SizeT)
SizeBufferAccessC::Swap(SizeBufferAccessC &)
SizeBufferAccessC::Attach(const SizeBufferAccessC &)
SizeBufferAccessC::Attach(const BufferAccessC &,SizeT)
SizeBufferAccessC::operator +(SizeT) const
SizeBufferAccessC::Fill(const DataT &)
SizeBufferAccessC::CopyFrom(const SizeBufferAccessC &)
SizeBufferAccessC::Reverse(void)
SizeBufferAccessC::BufferFrom(UIntT)
SizeBufferAccessC::BufferFrom(UIntT,UIntT)
SizeBufferAccessC::operator ==(const SizeBufferAccessC &) const
BufferAccessC::ReferenceElm(void) const
BufferAccessC::ReferenceVoid(void) const
BufferAccessC::IsValid(void) const
BufferAccessC::operator [](const IndexC) const
BufferAccessC::operator [](const IndexC)
BufferAccessC::operator +=(IndexC)
BufferAccessC::operator -=(IndexC)
BufferAccessC::operator -(IndexC) const
BufferAccessC::operator +(IndexC) const
BufferAccessC::operator ==(const BufferAccessC &) const
BufferAccessC::operator !=(const BufferAccessC &) const

   RealHistogram1dC   
 
Create a histogram of real values.
 
include "Ravl/RealHistogram1d.hh"
User Level:Normal
Library:RavlMath
In Scope:RavlN

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

RealHistogram1dC(RealT min,RealT max,UIntT steps)
Create a histogram.

RealHistogram1dC(RealT nscale,RealT noffset,const SArray1dC<UIntC> & array)
Create a histogram from an offset, scale and a SArray1d.

RealT Scale() const
Scaling.

RealT Offset() const
Offset used in table.

IndexC Bin(RealT v) const
Get the bin which value 'v' falls into.

RealT MidBin(IndexC bin) const
Get the middle of given bin.

void Reset()
Reset counters in histogram to zero.

void Vote(RealT v)
Vote for value.
Note, this will not check that the value is within the histogram. In check mode this will cause an error, in optimised it will corrupt memory.

bool CheckVote(RealT v)
Vote for value.
Returns false if value is out of range.

UIntT TotalVotes() const
Find the total number of votes cast.
This is computed not stored, and so is relatively slow.

RealT Information() const
Calculate the amount of information represented by the histogram.
This is also known as the entropy of the histogram.

RealT Energy() const
Calculate the energy represented by the original signal.

MeanVarianceC MeanVariance() const
Calculate the mean and variance for the signal.

Constructors, assigment, and destructor

#include "Ravl/SArray1d.hh"
SArray1dC<UIntC> Copy() const
Creates a new physical copy of the array.

SArray1dC<UIntC> Copy(UIntT extend) const
Creates a new physical copy of the array.
'extend' extra elements initalised by the default constuctor are appended to the end of the array.

void CopyFrom(const Slice1dC<UIntC> & slice)
Copy contents of slice into array.
The first element of the slice is copied to element 0 of this array, second to 1 etc. If this array isn't large enough an exception is thrown.

const SArray1dC<UIntC> & operator =(const SArray1dC<UIntC> & vv)
Assign this handle to the data in VV.

SArray1dC<UIntC> operator +(const SArray1dC<UIntC> & arr) const
Sums 2 numerical arrays.
The operator returns the result as a new array.

SArray1dC<UIntC> operator -(const SArray1dC<UIntC> & arr) const
Subtract 2 numerical arrays.
The operator returns the result as a new array.

SArray1dC<UIntC> operator *(const SArray1dC<UIntC> & arr) const
Mutliplies 2 numerical arrays.
The operator returns the result as a new array.

SArray1dC<UIntC> operator /(const SArray1dC<UIntC> & arr) const
Divides 2 numerical arrays.
The operator returns the result as a new array.

SArray1dC<UIntC> operator *(const UIntC & number) const
Multiplys the array by the 'number'.
The operator returns the result as a new array.

SArray1dC<UIntC> operator /(const UIntC & number) const
Divides all array items by the 'number'.
The operator returns the result as a new array.

SArray1dC<UIntC> operator +(const UIntC & number) const
Adds 'number' to the array.
The operator returns the result as a new array.

SArray1dC<UIntC> operator -(const UIntC & number) const
Subtracts 'number' from all array items.
The operator returns the result as a new array.

const SArray1dC<UIntC> & operator +=(const SArray1dC<UIntC> & arr)
Adds the 2nd array to this array.

const SArray1dC<UIntC> & operator -=(const SArray1dC<UIntC> & arr)
Subtracts the 2nd array from this array.

const SArray1dC<UIntC> & operator *=(const SArray1dC<UIntC> & arr)
Multiplies the 2nd array to this array.

const SArray1dC<UIntC> & operator /=(const SArray1dC<UIntC> & arr)
Divides the 2nd array from this array.

const SArray1dC<UIntC> & operator +=(const UIntC & number)
Adds 'number' to all array items.

const SArray1dC<UIntC> & operator -=(const UIntC & number)
Subtracts 'number' from all array items.

const SArray1dC<UIntC> & operator *=(const UIntC & number)
Multiplies the array by the 'number'.

const SArray1dC<UIntC> & operator /=(const UIntC & number)
Divides the array elements by the 'number'.

UIntC Sum() const
Calculate the sum of all elements in the array

UIntC SumSqr() const
Calculate the sum of the squares of all elements in the array

Access to the object and its parts.
const SArray1dC<UIntC> & SArray1d() const
Access to the whole constant array.

SArray1dC<UIntC> & SArray1d()
Access to the whole array.

Slice1dC<UIntC> Slice1d()
Access array as a slice.

Modifications of the representation
SArray1dC<UIntC> & Append(const SArray1dC<UIntC> & a)
This array is extended by the length of the array 'a' and the contents of both arrays are copied to it. Empty arrays are handled correctly.

SArray1dC<UIntC> Join(const SArray1dC<UIntC> & Oth) const
Join this Array and another into a new Array which is returned. This does not change either of its arguments. This is placed in the array first, followed by 'Oth'.

SArray1dC<UIntC> From(UIntT offset)
Return array from offset to the end of the array.
If offset is larger than the array an empty array is returned,

SArray1dC<UIntC> From(UIntT offset,UIntT size)
Return array from offset to the end of the array.
If offset is larger than the array an empty array is returned,

SArray1dC<UIntC> After(UIntT offset)
Return array after offset to the end of the array.
If offset is larger than the array an empty array is returned,

Special operations
BufferC<UIntC> & Buffer()
Access base data buffer.
Experts only.

const BufferC<UIntC> & Buffer() const
Constant access base data buffer.
Experts only.

void Sort()
Sort the array in place.
This does a simple bubble sort. FIXME:- we could do with something better!

bool operator ==(const SArray1dC<UIntC> & vv)
Comparison operator
Returns true if the two arrays are the same length and their contents are identical.

UIntT Hash() const
Compute a hash value for the array.

UIntC * DataStart() const
Returns the address of element 0.
If the array has zero length a null pointer may be returned.

#include "Ravl/SBfAcc.hh"
const SizeBufferAccessC<UIntC> & operator =(UIntC * bp)
Changes the reference element to the element pointed by 'bp'. Access to the object --------------------

UIntC * DataStart() const
Returns the address of the first element of the buffer.

SizeT Size() const
Returns the number of elements of the array.

IndexRangeC Limits() const
Returns the usable range of indeces expressed by this object.

IndexRangeC Range() const
Returns the usable range of indeces expressed by this object.

IndexC IMin() const
Returns the minimum index of the range of this access.

IndexC IMax() const
Returns the maximum index of the range of this access.

const UIntC & operator [](const IndexC i) const
Read-only access to the ('i'+1)-th element of the buffer.

UIntC & operator [](const IndexC i)
Read-write access to the ('i'+1)-th element of the buffer.

const SizeBufferAccessC<UIntC> & SAccess(void) const
Returns this object. Logical functions -----------------

bool IsEmpty() const
Returns TRUE if the size of the array is zero.

bool Contains(IndexC i) const
Returns TRUE if the array contains an item with the index 'i'. Modifications of the access ---------------------------

SizeT ShrinkHigh(SizeT k)
Changes the number of elements by subtracting the last 'k' elements.

const SizeBufferAccessC<UIntC> & Swap(SizeBufferAccessC<UIntC> & a)
Exchanges the contents of this buffer with buffer 'a'.

void Attach(const SizeBufferAccessC<UIntC> & b)
Changes this buffer access to have the same access rights as 'b'.

void Attach(const BufferAccessC<UIntC> & b,SizeT size)
Changes this buffer access to have the access rights as 'b' limited for 'size' elements.

SizeBufferAccessC<UIntC> operator +(SizeT i) const
Creates the new access object shifted 'i' elements to the right (towards next elements). The size is descreased to fit the the original range of this access. Modifications of the buffer contents ------------------------------------

void Fill(const UIntC & d)
'd' value is assigned to all elements of the buffer.

void CopyFrom(const SizeBufferAccessC<UIntC> & oth)
Copy contents of another buffer into this one.
NB. Buffers MUST be the same length.

void Reverse()
Reverse the order of elements in this array in place.

SizeBufferAccessC<UIntC> BufferFrom(UIntT first)
Get an access for this buffer starting from the 'first' element to the end of the buffer.

SizeBufferAccessC<UIntC> BufferFrom(UIntT first,UIntT len)
Get an access for this buffer starting from the 'first' element for 'len' elements.
An error will be generated if the requested buffer isn't contains within this one.

bool operator ==(const SizeBufferAccessC<UIntC> & ba) const
Are two accesses the same ?

#include "Ravl/BufferAccess.hh"
UIntC * ReferenceElm() const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer.

void * ReferenceVoid() const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer. The function is intended to be used in printing.

bool IsValid() const
Returns TRUE if this buffer access is not a default access object.

const UIntC & operator [](const IndexC i) const
Read-only access to the ('i'+1)-th element of the buffer.

UIntC & operator [](const IndexC i)
Read-write access to the ('i'+1)-th element of the buffer.

const BufferAccessC<UIntC> & operator +=(IndexC ind)
Inplace Add index to start position.

const BufferAccessC<UIntC> & operator -=(IndexC ind)
Inplace Subtract index from start position.

BufferAccessC<UIntC> operator -(IndexC ind) const
Substract value from position, and return it as a new value.

BufferAccessC<UIntC> operator +(IndexC ind) const
Substract value from position, and return it as a new value.

bool operator ==(const BufferAccessC<UIntC> & ba) const
Are two accesses the same ?

bool operator !=(const BufferAccessC<UIntC> & ba) const
Are two accesses the same ?


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002