mdp_measure Class Reference

implements error propagation More...

#include <mdp_measure.h>

List of all members.

Public Member Functions

int getnum ()
float getmean ()
float getmerr ()
 mdp_measure ()
 mdp_measure (float mean_, float error_, int num_=1)
void reset ()
void set (float x, float dx, int i=1)
void operator<< (float x)
void operator>> (float &x)

Public Attributes

int num
float mean
float error

Friends

mdp_measure operator+ (mdp_measure a, mdp_measure b)
mdp_measure operator- (mdp_measure a, mdp_measure b)
mdp_measure operator* (mdp_measure a, mdp_measure b)
mdp_measure operator/ (mdp_measure a, mdp_measure b)
mdp_measure operator+ (float a, mdp_measure b)
mdp_measure operator- (float a, mdp_measure b)
mdp_measure operator* (float a, mdp_measure b)
mdp_measure operator/ (float a, mdp_measure b)
mdp_measure operator+ (mdp_measure a, float b)
mdp_measure operator- (mdp_measure a, float b)
mdp_measure operator* (mdp_measure a, float b)
mdp_measure operator/ (mdp_measure a, float b)
mdp_measure exp (mdp_measure a)
mdp_measure log (mdp_measure a)
mdp_measure pow (mdp_measure a, float b)
mdp_measure sin (mdp_measure a)
mdp_measure cos (mdp_measure a)
void print (mdp_measure a)

Detailed Description

implements error propagation

Example:

///    mdp_measure m;
///    // store 10 measurements
///    for(int i=0; i<10; i++) 
///       m << 3.0+mdp_random.gaussian(2.0);
///    m=sin(exp(m)+m);
///    cout << m.getmean() << "+/-" << m.geterr() << endl;
/// 

Assumes gaussian error propagation


Constructor & Destructor Documentation

mdp_measure::mdp_measure (  )  [inline]
mdp_measure::mdp_measure ( float  mean_,
float  error_,
int  num_ = 1 
) [inline]

Member Function Documentation

float mdp_measure::getmean (  )  [inline]
float mdp_measure::getmerr (  )  [inline]
int mdp_measure::getnum (  )  [inline]
void mdp_measure::operator<< ( float  x  )  [inline]
void mdp_measure::operator>> ( float &  x  )  [inline]
void mdp_measure::reset (  )  [inline]
void mdp_measure::set ( float  x,
float  dx,
int  i = 1 
) [inline]

Friends And Related Function Documentation

mdp_measure cos ( mdp_measure  a  )  [friend]
mdp_measure exp ( mdp_measure  a  )  [friend]
mdp_measure log ( mdp_measure  a  )  [friend]
mdp_measure operator* ( mdp_measure  a,
float  b 
) [friend]
mdp_measure operator* ( float  a,
mdp_measure  b 
) [friend]
mdp_measure operator* ( mdp_measure  a,
mdp_measure  b 
) [friend]
mdp_measure operator+ ( mdp_measure  a,
float  b 
) [friend]
mdp_measure operator+ ( float  a,
mdp_measure  b 
) [friend]
mdp_measure operator+ ( mdp_measure  a,
mdp_measure  b 
) [friend]
mdp_measure operator- ( mdp_measure  a,
float  b 
) [friend]
mdp_measure operator- ( float  a,
mdp_measure  b 
) [friend]
mdp_measure operator- ( mdp_measure  a,
mdp_measure  b 
) [friend]
mdp_measure operator/ ( mdp_measure  a,
float  b 
) [friend]
mdp_measure operator/ ( float  a,
mdp_measure  b 
) [friend]
mdp_measure operator/ ( mdp_measure  a,
mdp_measure  b 
) [friend]
mdp_measure pow ( mdp_measure  a,
float  b 
) [friend]
void print ( mdp_measure  a  )  [friend]
mdp_measure sin ( mdp_measure  a  )  [friend]

Member Data Documentation


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

Generated on Wed Dec 23 14:03:15 2009 for fermiqcd by  doxygen 1.6.1