Parallel Analog Ensemble
Public Member Functions | Friends | List of all members
Observations Class Referenceabstract

Observations is an abstract class that extends BasicData. It defines the interface of how to interact with the underlying data storage. This interface is accepted by the Analog Ensemble algorithm. More...

#include <Observations.h>

Inheritance diagram for Observations:
BasicData ObservationsPointer

Public Member Functions

 Observations ()
 
 Observations (const Observations &orig)
 
 Observations (const Parameters &, const Stations &, const Times &)
 
virtual ~Observations ()
 
virtual std::size_t num_elements () const =0
 
virtual const double * getValuesPtr () const =0
 
virtual double * getValuesPtr ()=0
 
virtual void setDimensions (const Parameters &parameters, const Stations &stations, const Times &times)=0
 
virtual void initialize (double)=0
 
virtual double getValue (std::size_t parameter_index, std::size_t station_index, std::size_t time_index) const =0
 
virtual void setValue (double val, std::size_t parameter_index, std::size_t station_index, std::size_t time_index)=0
 
virtual void subset (Observations &) const =0
 
virtual void subset (const Parameters &, const Stations &, const Times &, Observations &) const =0
 
virtual void print (std::ostream &) const
 
- Public Member Functions inherited from BasicData
 BasicData ()
 
 BasicData (const Parameters &, const Stations &, const Times &)
 
 BasicData (const BasicData &orig)
 
virtual ~BasicData ()
 
void setMembers (const Parameters &, const Stations &, const Times &)
 
const ParametersgetParameters () const
 
const StationsgetStations () const
 
const TimesgetTimes () const
 
ParametersgetParameters ()
 
StationsgetStations ()
 
TimesgetTimes ()
 
std::size_t getTimeStamp (std::size_t index) const
 
std::size_t getTimeIndex (std::size_t timestamp) const
 
std::size_t getTimeIndex (const Time &) const
 
BasicDataoperator= (const BasicData &)
 

Friends

std::ostream & operator<< (std::ostream &, const Observations &)
 

Additional Inherited Members

- Protected Attributes inherited from BasicData
Parameters parameters_
 
Stations stations_
 
Times times_
 

Detailed Description

Observations is an abstract class that extends BasicData. It defines the interface of how to interact with the underlying data storage. This interface is accepted by the Analog Ensemble algorithm.

Constructor & Destructor Documentation

◆ Observations() [1/3]

Observations::Observations ( )

◆ Observations() [2/3]

Observations::Observations ( const Observations orig)

◆ Observations() [3/3]

Observations::Observations ( const Parameters parameters,
const Stations stations,
const Times times 
)

◆ ~Observations()

Observations::~Observations ( )
virtual

Member Function Documentation

◆ getValue()

virtual double Observations::getValue ( std::size_t  parameter_index,
std::size_t  station_index,
std::size_t  time_index 
) const
pure virtual

Gets or sets a value using the array indices.

Parameters
parameter_indexParameter index.
station_indexStation index.
time_indexTime index.
Returns
a value.

Implemented in ObservationsPointer.

◆ getValuesPtr() [1/2]

virtual const double * Observations::getValuesPtr ( ) const
pure virtual

Gets a double pointer to the start of the values.

Returns
A double pointer.

Implemented in ObservationsPointer.

◆ getValuesPtr() [2/2]

virtual double * Observations::getValuesPtr ( )
pure virtual

Implemented in ObservationsPointer.

◆ initialize()

virtual void Observations::initialize ( double  )
pure virtual

Implemented in ObservationsPointer.

◆ num_elements()

virtual std::size_t Observations::num_elements ( ) const
pure virtual

Returns the total number of data values as one dimension.

Returns
A value.

Implemented in ObservationsPointer.

◆ print()

void Observations::print ( std::ostream &  ) const
virtual

Reimplemented from BasicData.

Reimplemented in ObservationsPointer.

◆ setDimensions()

virtual void Observations::setDimensions ( const Parameters parameters,
const Stations stations,
const Times times 
)
pure virtual

Sets the dimensions of forecasts and allocates memory for data values.

Parameters
parametersThe Parameters container.
stationsThe Stations container.
timesThe Times container.

Implemented in ObservationsPointer.

◆ setValue()

virtual void Observations::setValue ( double  val,
std::size_t  parameter_index,
std::size_t  station_index,
std::size_t  time_index 
)
pure virtual

Implemented in ObservationsPointer.

◆ subset() [1/2]

virtual void Observations::subset ( const Parameters ,
const Stations ,
const Times ,
Observations  
) const
pure virtual

Subset Observations. Dimensions are specified by the input arguments. The input Observations should be an empty Observations that will hold all subset information and values at the end of this function call.

Implemented in ObservationsPointer.

◆ subset() [2/2]

virtual void Observations::subset ( Observations ) const
pure virtual

Subset Observations. Dimensions to be extracted are determined from the function input Observations. The input Observations should have already allocated enough memory by calling setDimensions prior to this function call.

Implemented in ObservationsPointer.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  ,
const Observations  
)
friend

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