Logo
Reference manual - version orea_version
SparseNpvCube< T > Class Template Reference
Inheritance diagram for SparseNpvCube< T >:

Public Member Functions

 SparseNpvCube (const Date &asof, const std::set< std::string > &ids, const std::vector< Date > &dates, Size samples, Size depth, const T &t=T())
Size numIds () const override
 Return the length of each dimension.
Size numDates () const override
Size samples () const override
Size depth () const override
Date asof () const override
 Return the asof date (T0 date).
const std::map< std::string, Size > & idsAndIndexes () const override
 Get a map of id and their index position in this cube.
const std::vector< QuantLib::Date > & dates () const override
 Get the vector of dates for this cube.
Real getT0 (Size i, Size d) const override
 Get a T0 value from the cube using index.
void setT0 (Real value, Size i, Size d) override
 Set a value in the cube using index.
Real get (Size i, Size j, Size k, Size d) const override
 Get a value from the cube using index.
void set (Real value, Size i, Size j, Size k, Size d) override
 Set a value in the cube using index.
bool usesDoublePrecision () const override
Public Member Functions inherited from NPVCube
 NPVCube ()
 default ctor
 NPVCube (NPVCube &)=delete
 Do not allow cube copying.
NPVCubeoperator= (NPVCube const &)=delete
virtual ~NPVCube ()
 dtor
const std::set< std::string > ids () const
 Get a set of all ids in the cube.
virtual Real getT0 (const std::string &id, Size depth=0) const
 Get a T0 value from the cube using trade id.
virtual void setT0 (Real value, const std::string &id, Size depth=0)
 Set a value in the cube using trade id.
virtual Real get (const std::string &id, const QuantLib::Date &date, Size sample, Size depth=0) const
 Get a value from the cube using trade id and date.
virtual void set (Real value, const std::string &id, const QuantLib::Date &date, Size sample, Size depth=0)
 Set a value in the cube using trade id and date.
virtual void removeT0 (Size id)
virtual void remove (Size id, Size sample, bool setToT0Value)
Size getTradeIndex (const std::string &id) const
Size getDateIndex (const QuantLib::Date &date) const

Additional Inherited Members

Protected Member Functions inherited from NPVCube
virtual Size index (const std::string &id) const
virtual Size index (const QuantLib::Date &date) const

Member Function Documentation

◆ numIds()

template<typename T>
Size numIds ( ) const
overridevirtual

Return the length of each dimension.

Implements NPVCube.

◆ numDates()

template<typename T>
Size numDates ( ) const
overridevirtual

Implements NPVCube.

◆ samples()

template<typename T>
Size samples ( ) const
overridevirtual

Implements NPVCube.

◆ depth()

template<typename T>
Size depth ( ) const
overridevirtual

Implements NPVCube.

◆ asof()

template<typename T>
Date asof ( ) const
overridevirtual

Return the asof date (T0 date).

Implements NPVCube.

◆ idsAndIndexes()

template<typename T>
const std::map< std::string, Size > & idsAndIndexes ( ) const
overridevirtual

Get a map of id and their index position in this cube.

Implements NPVCube.

◆ dates()

template<typename T>
const std::vector< QuantLib::Date > & dates ( ) const
overridevirtual

Get the vector of dates for this cube.

Implements NPVCube.

◆ getT0()

template<typename T>
Real getT0 ( Size id,
Size depth ) const
overridevirtual

Get a T0 value from the cube using index.

Implements NPVCube.

◆ setT0()

template<typename T>
void setT0 ( Real value,
Size id,
Size depth )
overridevirtual

Set a value in the cube using index.

Implements NPVCube.

◆ get()

template<typename T>
Real get ( Size id,
Size date,
Size sample,
Size depth ) const
overridevirtual

Get a value from the cube using index.

Implements NPVCube.

◆ set()

template<typename T>
void set ( Real value,
Size id,
Size date,
Size sample,
Size depth )
overridevirtual

Set a value in the cube using index.

Implements NPVCube.

◆ usesDoublePrecision()

template<typename T>
bool usesDoublePrecision ( ) const
overridevirtual

Implements NPVCube.