id_cluster Class Reference

Histogram. More...

#include <idcluster.h>

Inheritance diagram for id_cluster:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::map< unsigned,
unsigned > 
uumap

Public Member Functions

 id_cluster ()
virtual ~id_cluster ()
unsigned add (unsigned id, int amount=1)
float dotprod (const id_cluster &a) const
void print () const
void clear ()
unsigned get_freq (unsigned id)
float get_proba (unsigned id)

Public Attributes

uumap histo
unsigned total
cluster_id_t id
float weighted_sum


Detailed Description

Histogram.

The name of this class is confusing. It is just a histogram, stored in a sparse manner.

Definition at line 35 of file idcluster.h.


Member Typedef Documentation

typedef std::map<unsigned, unsigned> id_cluster::uumap

Definition at line 41 of file idcluster.h.


Constructor & Destructor Documentation

id_cluster::id_cluster (  )  [inline]

Definition at line 38 of file idcluster.h.

virtual id_cluster::~id_cluster (  )  [inline, virtual]

Definition at line 39 of file idcluster.h.


Member Function Documentation

unsigned id_cluster::add ( unsigned  id,
int  amount = 1 
)

void id_cluster::clear (  ) 

Definition at line 30 of file idcluster.cpp.

References histo, total, and weighted_sum.

Referenced by incremental_query::clear(), and visual_database::remove_object().

float id_cluster::dotprod ( const id_cluster a  )  const

Definition at line 164 of file idcluster.cpp.

References histo, and total.

unsigned id_cluster::get_freq ( unsigned  id  ) 

Definition at line 218 of file idcluster.cpp.

References histo.

Referenced by get_proba().

float id_cluster::get_proba ( unsigned  id  )  [inline]

Definition at line 54 of file idcluster.h.

References get_freq(), and total.

void id_cluster::print (  )  const

Definition at line 226 of file idcluster.cpp.

References histo, and total.


Member Data Documentation

Definition at line 44 of file idcluster.h.

Referenced by id_cluster_collection::add_cluster().

Definition at line 45 of file idcluster.h.

Referenced by clear(), and id_cluster_collection::update_cluster().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:25 2010 for Polyora by  doxygen 1.5.9