PLearn 0.1
Public Member Functions | Public Attributes
PLearn::StatsCollectorCounts Class Reference

#include <StatsCollector.h>

Collaboration diagram for PLearn::StatsCollectorCounts:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StatsCollectorCounts ()
virtual ~StatsCollectorCounts ()
virtual void merge (const StatsCollectorCounts &other)
 merge: Merge counts from another StatsCollectorCounts into this one.

Public Attributes

double n
 counts the number of occurences of the corresponding value
double nbelow
 counts the number of occurences of values below this counter's value but above the previous one
double sum
 sum of the values below this counter's but above the previous one
double sumsquare
 sum of squares of the values below this counter's but above the previous one
int id
 a unique int identifier corresponding to this value (ids will span from 0 to # of known values) also, take a look at StatsCollector::sortIds()

Detailed Description

Definition at line 58 of file StatsCollector.h.


Constructor & Destructor Documentation

PLearn::StatsCollectorCounts::StatsCollectorCounts ( ) [inline]

Definition at line 67 of file StatsCollector.h.

                          : 
        n(0), nbelow(0),
        sum(0.), sumsquare(0.),id(0) 
    {}          
virtual PLearn::StatsCollectorCounts::~StatsCollectorCounts ( ) [inline, virtual]

Definition at line 73 of file StatsCollector.h.

{}

Member Function Documentation

virtual void PLearn::StatsCollectorCounts::merge ( const StatsCollectorCounts other) [inline, virtual]

merge: Merge counts from another StatsCollectorCounts into this one.

Definition at line 79 of file StatsCollector.h.

References n, n, nbelow, sum, PLearn::sum(), sumsquare, and PLearn::sumsquare().

    {
        //don't change id
        n+= other.n;
        nbelow+= other.nbelow;
        sum+= other.sum;
        sumsquare+= other.sumsquare;
    }

Here is the call graph for this function:


Member Data Documentation

a unique int identifier corresponding to this value (ids will span from 0 to # of known values) also, take a look at StatsCollector::sortIds()

Definition at line 65 of file StatsCollector.h.

Referenced by PLearn::StatsCollector::getCount(), PLearn::operator<<(), and PLearn::operator>>().

counts the number of occurences of the corresponding value

Definition at line 61 of file StatsCollector.h.

Referenced by PLearn::StatsCollector::getApproximateCounts(), PLearn::StatsCollector::getCount(), merge(), PLearn::operator<<(), PLearn::operator>>(), and PLearn::VMatrix::printFieldInfo().

counts the number of occurences of values below this counter's value but above the previous one

Definition at line 62 of file StatsCollector.h.

Referenced by PLearn::StatsCollector::getApproximateCounts(), PLearn::StatsCollector::getCount(), merge(), PLearn::operator<<(), PLearn::operator>>(), and PLearn::VMatrix::printFieldInfo().

sum of the values below this counter's but above the previous one

Definition at line 63 of file StatsCollector.h.

Referenced by PLearn::StatsCollector::getApproximateCounts(), PLearn::StatsCollector::getCount(), merge(), PLearn::operator<<(), PLearn::operator>>(), and PLearn::VMatrix::printFieldInfo().

sum of squares of the values below this counter's but above the previous one

Definition at line 64 of file StatsCollector.h.

Referenced by PLearn::StatsCollector::getApproximateCounts(), PLearn::StatsCollector::getCount(), merge(), PLearn::operator<<(), and PLearn::operator>>().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines