Main Page | Class Hierarchy | Class List | File List | Class Members

Population Class Reference

A Population is a set of samples collected from the same sensor. More...

#include <measure.h>

List of all members.

Public Member Functions

 Population ()
 Create an empty population.

 ~Population ()
 The destructor does nothing.

unsigned int getSize () const
 Return the number of elements.

void addSample (sample_t x)
 Add a sample to the population.

sample_t getSample (bool &valid, unsigned int i)
 Return the i-th sample.

double mean (bool &valid)
 Return the mean of the population.

double confInterval (bool &valid, double cl)
 Return the confidence interval of the population.

void dump (std::ostream &os)
 Debug function to print the values to an output stream.


Private Attributes

std::vector< sample_t > population
 Vector of samples. It is the population itself.


Detailed Description

A Population is a set of samples collected from the same sensor.

project: measure filename: measure.h author: C. Cicconetti <c.cicconetti@iet.unipi.it> year: 2006 affiliation: Dipartimento di Ingegneria dell'Informazione University of Pisa, Italy description: definition of the main project classes


Member Function Documentation

void Population::addSample sample_t  x  ) 
 

Add a sample to the population.

project: measure filename: measure.cc author: C. Cicconetti <c.cicconetti@iet.unipi.it> year: 2006 affiliation: Dipartimento di Ingegneria dell'Informazione University of Pisa, Italy description: body of the main project classes


The documentation for this class was generated from the following files:
Generated on Tue May 30 08:09:56 2006 for ns2measure by doxygen 1.3.7