SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes | Friends
Beam::Variable Class Reference

Contains the value, measurement uncertainty and statistical uncertainty of a variable. More...

#include <Variable.hh>

Public Member Functions

 Variable ()
 Default constructor, initilizes everything to 0. More...
 
 Variable (const double &val, const double merr=0., const double serr=0.)
 Normal constructor, sets the value and uncertainties. More...
 
 Variable (const Variable &var)
 Copy constructor. More...
 
Variable & operator= (const Variable &var)
 Equality operator. More...
 
 ~Variable ()
 Destructor. More...
 
 operator double () const
 Overloads the double cast operator. More...
 
const double & GetValue () const
 Returns the value of the variable. More...
 
void SetValue (const double &val)
 Sets the value of the variable. More...
 
const double & GetMError () const
 Returns the measurement uncertainty of the variable. More...
 
void SetMError (const double &merr)
 Sets the measurement uncertainty of the variable. More...
 
const double & GetSError () const
 Returns the value of the variable. More...
 
void SetSError (const double &serr)
 Returns the reference to the statistical error on the variable to set it. More...
 
double GetError () const
 Returns the total quadratic error on the variable. More...
 

Private Attributes

double _val
 Value of the variable. More...
 
double _merr
 Value of the measurement uncertainty. More...
 
double _serr
 Value of the statistical uncertainty. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Variable &var)
 Overloads the ostream operator. More...
 

Detailed Description

Contains the value, measurement uncertainty and statistical uncertainty of a variable.

Constructor & Destructor Documentation

Beam::Variable::Variable ( )

Default constructor, initilizes everything to 0.

Beam::Variable::Variable ( const double &  val,
const double  merr = 0.,
const double  serr = 0. 
)

Normal constructor, sets the value and uncertainties.

Parameters
valValue of the variable
merrMeasurement error on the variable
serrStatistical error on the variable
Beam::Variable::Variable ( const Variable &  var)

Copy constructor.

Beam::Variable::~Variable ( )

Destructor.

Member Function Documentation

double Beam::Variable::GetError ( ) const
inline

Returns the total quadratic error on the variable.

const double& Beam::Variable::GetMError ( ) const
inline

Returns the measurement uncertainty of the variable.

const double& Beam::Variable::GetSError ( ) const
inline

Returns the value of the variable.

const double& Beam::Variable::GetValue ( ) const
inline

Returns the value of the variable.

Beam::Variable::operator double ( ) const
explicit

Overloads the double cast operator.

Variable & Beam::Variable::operator= ( const Variable &  var)

Equality operator.

void Beam::Variable::SetMError ( const double &  merr)
inline

Sets the measurement uncertainty of the variable.

void Beam::Variable::SetSError ( const double &  serr)
inline

Returns the reference to the statistical error on the variable to set it.

void Beam::Variable::SetValue ( const double &  val)
inline

Sets the value of the variable.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Variable &  var 
)
friend

Overloads the ostream operator.

Field Documentation

double Beam::Variable::_merr
private

Value of the measurement uncertainty.

double Beam::Variable::_serr
private

Value of the statistical uncertainty.

double Beam::Variable::_val
private

Value of the variable.


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