User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Statistics - Histogram - HistogramC<class KeyT>
 

  PUBLIC
HistogramC::HistogramC(void)
HistogramC::Vote(const KeyT &)
HistogramC::Vote(const KeyT &,UIntT)
HistogramC::Unvote(const KeyT &)
HistogramC::Total(void) const
HistogramC::Information(void) const
HistogramC::Energy(void) const
HistogramC::SumIntersection(const HistogramC &) const
HistogramC::LargestDifference(const HistogramC &,KeyT &,IntT &)
HistogramC::Size(void) const
HashC::Copy(void) const
HashC::Lookup(const K &) const
HashC::Lookup(const K &)
HashC::Lookup(const K &,T &) const
HashC::Update(const K &,const T &)
HashC::Update(const K &)
HashC::operator [](const K &)
HashC::operator [](const K &) const
HashC::Insert(const K &,const T &)
HashC::Access(const K &,const T &)
HashC::AccessCopy(const K &,const T &)
HashC::Del(const K &,bool)
HashC::Get(const K &,bool)
HashC::IsElm(const K &) const
HashC::Empty(void)
HashC::Bins(void) const
HashC::Resize(SizeT)
HashC::operator =(const HashC &)
HashC::operator ==(const HashC &) const
HashC::operator !=(const HashC &) const
HashC::Hash(void) const
HashC::Move(HashC &)
HashC::AddFrom(HashC &,bool)
HashC::Add(const HashC &,bool)
HashBaseC::IsEmpty(void) const
HashBaseC::Size(void) const
HashBaseC::NextPrime(SizeT)

   HistogramC<class KeyT>   
 
Histogram with discrete bins.
 
include "Ravl/Histogram.hh"
User Level:Normal
Library:RavlMath
Example:exHistogram.cc
In Scope:RavlN

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

UIntT Vote(const KeyT & bin)
Vote for 'bin'
returns the count of the bin after voting.

UIntT Vote(const KeyT & bin,UIntT noVotes)
Vote with 'noVotes' for 'bin'
returns the count of the bin after voting.

UIntT Unvote(const KeyT & bin)
Unvote for 'bin'
returns the count of the bin after unvoting.

UIntT Total() const
Sum of all the bins.

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.

UIntT SumIntersection(const HistogramC<KeyT> & oth) const
Return the sum of the intersection between the two histograms.

UIntT LargestDifference(const HistogramC<KeyT> & oth,KeyT & lKey,IntT & ldiff)
Return key with largest difference between this and 'oth'.
Returns the number of keys with an equal difference count.

The key is assigned to lKey, and the maximum difference to ldiff.


UIntT Size() const
Number of key's in the histogram.
Note: This is NOT the total number of votes.

#include "Ravl/Hash.hh"
HashC<KeyT,UIntC> Copy() const
Make a copy of the table.

const UIntC * Lookup(const KeyT & Key) const
Find data matching key.
Do not use, Try Lookup(key,data); Ptr == NULL, if matching key not found.

UIntC * Lookup(const KeyT & Key)
Find data matching key.
Do not use, Try Lookup(key,data); Ptr == NULL, if matching key not found.

bool Lookup(const KeyT & Key,UIntC & data) const
Lookup data for key.
Returns true if entry is found, and is assigned to 'data'.

bool Update(const KeyT & Key,const UIntC & Data)
Update member of hash table, will create new one if it doesn't exist.
Require's a default constructor & a working assigment operator !! Returns: True=Member existed already. False=New one was added.

UIntC & Update(const KeyT & Key)
Get value, add default if its not there. Return reference anyway.

UIntC & operator [](const KeyT & Key)
Associative array style interface.

const UIntC & operator [](const KeyT & Key) const
Associative array style of access.

bool Insert(const KeyT & Key,const UIntC & Data)
Default insertion operation, same as Update(K,T);

UIntC & Access(const KeyT & key,const UIntC & def = T ())
Access key, if it does not exist create a new bin with value 'def'
Retuns a reference to the entry.

UIntC & AccessCopy(const KeyT & key,const UIntC & def = T ())
Access key, if it does not exist create a new bin with a copy of value 'def'
Retuns a reference to the entry.

bool Del(const KeyT & Key,bool allowResize = true)
Delete member from table.

UIntC Get(const KeyT & Key,bool allowResize = true)
Get data element from table, and remove it.

bool IsElm(const KeyT & Key) const
Is key used in the table ?

void Empty(void)
Remove all items from table.

UIntT Bins(void) const
Number of bins in the HashTable.

void Resize(SizeT NewSize)
Resize hash table.

const HashC<KeyT,UIntC> & operator =(const HashC<KeyT,UIntC> & oth)
Assign from another hash table.

bool operator ==(const HashC<KeyT,UIntC> & oth) const
Are two hash tables identical ?

bool operator !=(const HashC<KeyT,UIntC> & oth) const
Are two hash tables different ?

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

void Move(HashC<KeyT,UIntC> & oth)
Move contents of another table into this one.
leave other empty. The previous contents of this table are removed.

void AddFrom(HashC<KeyT,UIntC> & oth,bool replace = true)
Add contents of another table into this one.
leave other empty. if replace is false the contents of the old table are not replace by the new entries.

void Add(const HashC<KeyT,UIntC> & oth,bool replace = true)
Add contents of another table into this one.
if replace is false the contents of the old table are not replace by the new entries.

bool IsEmpty() const
Is the table empty ?

UIntT Size() const
Count number of elements in table.

SizeT NextPrime(SizeT v)
Get the next prime not smaller than v.


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