YAP
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Protected Member Functions | Private Attributes | Friends | List of all members
CachedValue Class Reference

Class for managing cached values inside a DataPoint. More...

#include <CachedValue.h>

Inheritance diagram for CachedValue:
ComplexCachedValue FourVectorCachedValue RealCachedValue

Classes

struct  Status
 stores calculation and variable statuses for a CachedValue More...
 

Public Member Functions

Getters
DataAccessorowner () const
 
const int index () const
 
const double value (unsigned index, const DataPoint &d, unsigned sym_index) const
 
virtual const unsigned size () const
 
Setters
void setValue (unsigned index, double val, DataPoint &d, unsigned sym_index) const
 

Protected Member Functions

 CachedValue (unsigned size, DataAccessor &da)
 
void addToDataAccessor ()
 add to the Owner_
 
void setIndex (int i)
 set index
 
void setPosition (int p)
 set position
 

Private Attributes

DataAccessorOwner_
 Owning DataAccessor.
 
int Index_
 index within owner
 
int Position_
 Position of first element of cached value within data vector.
 
unsigned Size_
 Size of cached value (number of real elements)
 

Friends

class DataAccessor
 grant friend status to DataAccessor to set itself owner
 

Detailed Description

Class for managing cached values inside a DataPoint.

Author
Johannes Rauch, Daniel Greenwald

Constructor & Destructor Documentation

CachedValue ( unsigned  size,
DataAccessor da 
)
protected

Constructor (protected)

Parameters
sizenumber of real elements in cached value
daDataAccessor it to belong to

Member Function Documentation

const int index ( ) const
inline
Returns
index within owner
DataAccessor* owner ( ) const
inline
Returns
raw pointer owning DataAccessor
void setValue ( unsigned  index,
double  val,
DataPoint d,
unsigned  sym_index 
) const
inline

Set value into #DataPoint for particular symmetrization (No update to VariableStatus or CalculationStatus is made!)

Parameters
indexindex of value to get from within cached value (must be less than Size_)
valValue to set to
d#DataPoint to update
sym_indexindex of symmetrization to apply to
virtual const unsigned size ( ) const
inlinevirtual
Returns
Size of cached value (number of real elements)
const double value ( unsigned  index,
const DataPoint d,
unsigned  sym_index 
) const
inline

Get value from #DataPoint for particular symmetrization

Parameters
indexindex of value to get from within cached value (must be less than Size_)
d#DataPoint to get value from
sym_indexindex of symmetrization to grab from
Returns
Value of CachedValue inside the data point

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