#include <orea/cube/jointnpvcube.hpp>
Inheritance diagram for JointNPVCube:
Collaboration diagram for JointNPVCube:Public Member Functions | |
| JointNPVCube (const QuantLib::ext::shared_ptr< NPVCube > &cube1, const QuantLib::ext::shared_ptr< NPVCube > &cube2, const std::set< std::string > &ids={}, const bool requireUniqueIds=true, const std::function< Real(Real a, Real x)> &accumulator=[](Real a, Real x) { return a+x;}, const Real accumulatorInit=0.0) | |
| JointNPVCube (const std::vector< QuantLib::ext::shared_ptr< NPVCube > > &cubes, const std::set< std::string > &ids={}, const bool requireUniqueIds=true, const std::function< Real(Real a, Real x)> &accumulator=[](Real a, Real x) { return a+x;}, const Real accumulatorInit=0.0) | |
| Size | numIds () const override |
| Return the length of each dimension. More... | |
| Size | numDates () const override |
| Size | samples () const override |
| Size | depth () const override |
| const std::map< std::string, Size > & | idsAndIndexes () const override |
| Get a map of id and their index position in 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 id, Size depth=0) const override |
| Get a T0 value from the cube using index. More... | |
| void | setT0 (Real value, Size id, Size depth=0) override |
| Set a value in the cube using index. More... | |
| Real | get (Size id, Size date, Size sample, Size depth=0) const override |
| Get a value from the cube using index. More... | |
| void | set (Real value, Size id, Size date, Size sample, Size depth=0) override |
| Set a value in the cube using index. 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 |
Private Member Functions | |
| std::set< std::pair< QuantLib::ext::shared_ptr< NPVCube >, Size > > | cubeAndId (Size id) const |
Private Attributes | |
| const std::vector< QuantLib::ext::shared_ptr< NPVCube > > | cubes_ |
| const std::function< Real(Real a, Real x)> | accumulator_ |
| const Real | accumulatorInit_ |
| std::map< std::string, Size > | idIdx_ |
| std::vector< std::set< std::pair< QuantLib::ext::shared_ptr< NPVCube >, Size > > > | cubeAndId_ |
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 |
Definition at line 38 of file jointnpvcube.hpp.
| JointNPVCube | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube1, |
| const QuantLib::ext::shared_ptr< NPVCube > & | cube2, | ||
| const std::set< std::string > & | ids = {}, |
||
| const bool | requireUniqueIds = true, |
||
| const std::function< Real(Real a, Real x)> & | accumulator = [](Real a, Real x) { return a + x; }, |
||
| const Real | accumulatorInit = 0.0 |
||
| ) |
ctor for two input cubes
Definition at line 29 of file jointnpvcube.cpp.
| JointNPVCube | ( | const std::vector< QuantLib::ext::shared_ptr< NPVCube > > & | cubes, |
| const std::set< std::string > & | ids = {}, |
||
| const bool | requireUniqueIds = true, |
||
| const std::function< Real(Real a, Real x)> & | accumulator = [](Real a, Real x) { return a + x; }, |
||
| const Real | accumulatorInit = 0.0 |
||
| ) |
ctor for n input cubes
Definition at line 34 of file jointnpvcube.cpp.
Here is the call graph for this function:
|
overridevirtual |
Return the length of each dimension.
Implements NPVCube.
Definition at line 96 of file jointnpvcube.cpp.
|
overridevirtual |
Implements NPVCube.
Definition at line 98 of file jointnpvcube.cpp.
Here is the caller graph for this function:
|
overridevirtual |
Implements NPVCube.
Definition at line 100 of file jointnpvcube.cpp.
Here is the caller graph for this function:
|
overridevirtual |
Implements NPVCube.
Definition at line 102 of file jointnpvcube.cpp.
Here is the caller graph for this function:
|
overridevirtual |
Get a map of id and their index position in this cube.
Implements NPVCube.
Definition at line 104 of file jointnpvcube.cpp.
Here is the caller graph for this function:
|
overridevirtual |
Get the vector of dates for this cube.
Implements NPVCube.
Definition at line 106 of file jointnpvcube.cpp.
|
overridevirtual |
|
overridevirtual |
Get a T0 value from the cube using index.
Implements NPVCube.
Definition at line 116 of file jointnpvcube.cpp.
Here is the call graph for this function:
|
overridevirtual |
Set a value in the cube using index.
Implements NPVCube.
Definition at line 126 of file jointnpvcube.cpp.
Here is the call graph for this function:
|
overridevirtual |
Get a value from the cube using index.
Implements NPVCube.
Definition at line 133 of file jointnpvcube.cpp.
Here is the call graph for this function:
|
overridevirtual |
Set a value in the cube using index.
Implements NPVCube.
Definition at line 143 of file jointnpvcube.cpp.
Here is the call graph for this function:
|
private |
Definition at line 110 of file jointnpvcube.cpp.
Here is the caller graph for this function:
|
private |
Definition at line 81 of file jointnpvcube.hpp.
|
private |
Definition at line 82 of file jointnpvcube.hpp.
|
private |
Definition at line 83 of file jointnpvcube.hpp.
|
private |
Definition at line 85 of file jointnpvcube.hpp.
|
private |
Definition at line 86 of file jointnpvcube.hpp.