JaggedCube stores the cube in memory using a vector of trade specific blocks. More...
#include <orea/cube/jaggedcube.hpp>
Inheritance diagram for JaggedCube< T >:
Collaboration diagram for JaggedCube< T >:Public Member Functions | |
| JaggedCube (Date asof, QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const vector< Date > &dates, Size samples, Size depth) | |
| JaggedCube (Date asof, QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const vector< Date > &dates, Size samples, const DepthCalculator &dc) | |
| void | init (Date asof, QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const vector< Date > &dates, Size samples, const DepthCalculator &dc) |
| Size | numIds () const override |
| Return the length of each dimension. More... | |
| Size | numDates () const override |
| Size | samples () const override |
| Size | depth () const override |
| Real | avgDateLen () const |
| Real | avgDepth () const |
| const std::map< std::string, Size > & | idsAndIndexes () const override |
| Get the vector of ids for this cube. More... | |
| const std::vector< QuantLib::Date > & | dates () const override |
| Get the vector of dates for this cube. More... | |
| QuantLib::Date | asof () const override |
| Return the asof date (T0 date) More... | |
| Real | getT0 (Size i, Size d) const override |
| Get a T0 value from the cube. More... | |
| void | setT0 (Real value, Size i, Size d) override |
| Set a value in the cube. More... | |
| Real | get (Size i, Size j, Size k, Size d) const override |
| Get a value from the cube. More... | |
| void | set (Real value, Size i, Size j, Size k, Size d) override |
| Set a value in the cube. More... | |
Public Member Functions inherited from NPVCube | |
| NPVCube () | |
| default ctor More... | |
| NPVCube (NPVCube &)=delete | |
| Do not allow cube copying. More... | |
| NPVCube & | operator= (NPVCube const &)=delete |
| virtual | ~NPVCube () |
| dtor More... | |
| virtual Size | numIds () const =0 |
| Return the length of each dimension. More... | |
| virtual Size | numDates () const =0 |
| virtual Size | samples () const =0 |
| virtual Size | depth () const =0 |
| virtual const std::map< std::string, Size > & | idsAndIndexes () const =0 |
| Get a map of id and their index position in this cube. More... | |
| const std::set< std::string > | ids () const |
| Get a set of all ids in the cube. More... | |
| virtual const std::vector< QuantLib::Date > & | dates () const =0 |
| Get the vector of dates for this cube. More... | |
| virtual QuantLib::Date | asof () const =0 |
| Return the asof date (T0 date) More... | |
| virtual Real | getT0 (Size id, Size depth=0) const =0 |
| Get a T0 value from the cube using index. More... | |
| virtual Real | getT0 (const std::string &id, Size depth=0) const |
| Get a T0 value from the cube using trade id. More... | |
| virtual void | setT0 (Real value, Size id, Size depth=0)=0 |
| Set a value in the cube using index. More... | |
| virtual void | setT0 (Real value, const std::string &id, Size depth=0) |
| Set a value in the cube using trade id. More... | |
| virtual Real | get (Size id, Size date, Size sample, Size depth=0) const =0 |
| Get a value from the cube using index. More... | |
| virtual void | set (Real value, Size id, Size date, Size sample, Size depth=0)=0 |
| Set a value in the cube using index. More... | |
| 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. More... | |
| 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. More... | |
| virtual void | remove (Size id) |
| virtual void | remove (Size id, Size sample) |
| Size | getTradeIndex (const std::string &id) const |
Protected Member Functions | |
| void | check (Size i, Size j, Size k, Size d) const |
Protected Member Functions inherited from NPVCube | |
| virtual Size | index (const std::string &id) const |
| virtual Size | index (const QuantLib::Date &date) const |
Private Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
Private Attributes | |
| QuantLib::Date | asof_ |
| std::map< std::string, Size > | ids_ |
| vector< QuantLib::Date > | dates_ |
| Size | samples_ |
| Size | maxDepth_ |
| vector< TradeBlock< T > > | blocks_ |
Friends | |
| class | boost::serialization::access |
JaggedCube stores the cube in memory using a vector of trade specific blocks.
JaggedCube stores the cube in memory using a vector of trade specific blocks to allow both single and double precision implementations.
Definition at line 140 of file jaggedcube.hpp.
| JaggedCube | ( | Date | asof, |
| QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, | ||
| const vector< Date > & | dates, | ||
| Size | samples, | ||
| Size | depth | ||
| ) |
Definition at line 142 of file jaggedcube.hpp.
Here is the call graph for this function:| JaggedCube | ( | Date | asof, |
| QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, | ||
| const vector< Date > & | dates, | ||
| Size | samples, | ||
| const DepthCalculator & | dc | ||
| ) |
| void init | ( | Date | asof, |
| QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, | ||
| const vector< Date > & | dates, | ||
| Size | samples, | ||
| const DepthCalculator & | dc | ||
| ) |
Definition at line 153 of file jaggedcube.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Return the length of each dimension.
Implements NPVCube.
Definition at line 180 of file jaggedcube.hpp.
Here is the caller graph for this function:
|
overridevirtual |
Implements NPVCube.
Definition at line 181 of file jaggedcube.hpp.
Here is the caller graph for this function:
|
overridevirtual |
Implements NPVCube.
Definition at line 182 of file jaggedcube.hpp.
Here is the caller graph for this function:
|
overridevirtual |
Implements NPVCube.
Definition at line 183 of file jaggedcube.hpp.
Here is the caller graph for this function:| Real avgDateLen | ( | ) | const |
Definition at line 185 of file jaggedcube.hpp.
| Real avgDepth | ( | ) | const |
Definition at line 197 of file jaggedcube.hpp.
|
overridevirtual |
Get the vector of ids for this cube.
Implements NPVCube.
Definition at line 208 of file jaggedcube.hpp.
|
overridevirtual |
Get the vector of dates for this cube.
Implements NPVCube.
Definition at line 210 of file jaggedcube.hpp.
Here is the caller graph for this function:
|
overridevirtual |
Return the asof date (T0 date)
Implements NPVCube.
Definition at line 213 of file jaggedcube.hpp.
Here is the caller graph for this function:
|
overridevirtual |
|
overridevirtual |
Set a value in the cube.
Implements NPVCube.
Definition at line 222 of file jaggedcube.hpp.
Here is the call graph for this function:
|
overridevirtual |
|
overridevirtual |
Set a value in the cube.
Implements NPVCube.
Definition at line 235 of file jaggedcube.hpp.
Here is the call graph for this function:
|
protected |
Definition at line 242 of file jaggedcube.hpp.
Here is the call graph for this function:
|
private |
|
friend |
Definition at line 250 of file jaggedcube.hpp.
|
private |
Definition at line 260 of file jaggedcube.hpp.
|
private |
Definition at line 261 of file jaggedcube.hpp.
|
private |
Definition at line 262 of file jaggedcube.hpp.
|
private |
Definition at line 263 of file jaggedcube.hpp.
|
private |
Definition at line 264 of file jaggedcube.hpp.
|
private |
Definition at line 265 of file jaggedcube.hpp.