Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
AggregationScenarioData Class Referenceabstract

Container for storing simulated market data. More...

#include <orea/scenario/aggregationscenariodata.hpp>

+ Inheritance diagram for AggregationScenarioData:
+ Collaboration diagram for AggregationScenarioData:

Public Member Functions

 AggregationScenarioData ()
 default ctor More...
 
 AggregationScenarioData (AggregationScenarioData &)=delete
 Do not allow copying. More...
 
AggregationScenarioDataoperator= (AggregationScenarioData const &)=delete
 
virtual ~AggregationScenarioData ()
 dtor More...
 
virtual Size dimDates () const =0
 Return the length of each dimension. More...
 
virtual Size dimSamples () const =0
 
virtual bool has (const AggregationScenarioDataType &type, const string &qualifier="") const =0
 Check whether data is available for the given type. More...
 
virtual Real get (Size dateIndex, Size sampleIndex, const AggregationScenarioDataType &type, const string &qualifier="") const =0
 Get a value from the cube. More...
 
virtual void set (Size dateIndex, Size sampleIndex, Real value, const AggregationScenarioDataType &type, const string &qualifier="")=0
 Set a value in the cube. More...
 
virtual std::vector< std::pair< AggregationScenarioDataType, std::string > > keys () const =0
 
virtual void set (Real value, const AggregationScenarioDataType &type, const string &qualifier="")
 Set a value in the cube, assumes normal traversal of the cube (dates then samples) More...
 
virtual void next ()
 Go to the next point on the cube. More...
 

Private Attributes

Size dIndex_
 
Size sIndex_
 

Detailed Description

Container for storing simulated market data.

The indexes for dates and samples are (by convention) the same as in the npv cube

\ingroup scenario

Definition at line 58 of file aggregationscenariodata.hpp.

Constructor & Destructor Documentation

◆ AggregationScenarioData() [1/2]

◆ AggregationScenarioData() [2/2]

Do not allow copying.

◆ ~AggregationScenarioData()

virtual ~AggregationScenarioData ( )
virtual

dtor

Definition at line 66 of file aggregationscenariodata.hpp.

66{}

Member Function Documentation

◆ operator=()

AggregationScenarioData & operator= ( AggregationScenarioData const &  )
delete

◆ dimDates()

virtual Size dimDates ( ) const
pure virtual

Return the length of each dimension.

Implemented in InMemoryAggregationScenarioData.

+ Here is the caller graph for this function:

◆ dimSamples()

virtual Size dimSamples ( ) const
pure virtual

Implemented in InMemoryAggregationScenarioData.

+ Here is the caller graph for this function:

◆ has()

virtual bool has ( const AggregationScenarioDataType type,
const string &  qualifier = "" 
) const
pure virtual

Check whether data is available for the given type.

Implemented in InMemoryAggregationScenarioData.

◆ get()

virtual Real get ( Size  dateIndex,
Size  sampleIndex,
const AggregationScenarioDataType type,
const string &  qualifier = "" 
) const
pure virtual

Get a value from the cube.

Implemented in InMemoryAggregationScenarioData.

+ Here is the caller graph for this function:

◆ set() [1/2]

virtual void set ( Size  dateIndex,
Size  sampleIndex,
Real  value,
const AggregationScenarioDataType type,
const string &  qualifier = "" 
)
pure virtual

Set a value in the cube.

Implemented in InMemoryAggregationScenarioData.

+ Here is the caller graph for this function:

◆ keys()

virtual std::vector< std::pair< AggregationScenarioDataType, std::string > > keys ( ) const
pure virtual

Implemented in InMemoryAggregationScenarioData.

+ Here is the caller graph for this function:

◆ set() [2/2]

virtual void set ( Real  value,
const AggregationScenarioDataType type,
const string &  qualifier = "" 
)
virtual

Set a value in the cube, assumes normal traversal of the cube (dates then samples)

Definition at line 86 of file aggregationscenariodata.hpp.

86 {
87 set(dIndex_, sIndex_, value, type, qualifier);
88 }
virtual void set(Size dateIndex, Size sampleIndex, Real value, const AggregationScenarioDataType &type, const string &qualifier="")=0
Set a value in the cube.
+ Here is the call graph for this function:

◆ next()

virtual void next ( )
virtual

Go to the next point on the cube.

Go to the next point on the cube, assumes we do date, then samples

Definition at line 92 of file aggregationscenariodata.hpp.

92 {
93 if (++dIndex_ == dimDates()) {
94 dIndex_ = 0;
95 sIndex_++;
96 }
97 }
virtual Size dimDates() const =0
Return the length of each dimension.
+ Here is the call graph for this function:

Member Data Documentation

◆ dIndex_

Size dIndex_
private

Definition at line 100 of file aggregationscenariodata.hpp.

◆ sIndex_

Size sIndex_
private

Definition at line 100 of file aggregationscenariodata.hpp.