40 Size
depth,
const T& t = T());
41 Size
numIds()
const override;
44 Size
depth()
const override;
45 Date
asof()
const override;
46 const std::map<std::string, Size>&
idsAndIndexes()
const override;
47 const std::vector<QuantLib::Date>&
dates()
const override;
48 Real
getT0(Size i, Size d)
const override;
49 void setT0(Real
value, Size i, Size d)
override;
50 Real
get(Size i, Size j, Size k, Size d)
const override;
51 void set(Real
value, Size i, Size j, Size k, Size d)
override;
54 void check(Size i, Size j, Size k, Size d)
const;
55 Size
pos(Size i, Size j, Size d)
const;
58 std::map<std::string, Size>
ids_;
62 std::map<Size, std::vector<T>>
data_;
NPV Cube class stores both future and current NPV values.
const std::set< std::string > ids() const
Get a set of all ids in the cube.
Size pos(Size i, Size j, Size d) const
Date asof() const override
Return the asof date (T0 date)
Real get(Size i, Size j, Size k, Size d) const override
Get a value from the cube using index.
Size numIds() const override
Return the length of each dimension.
Size depth() const override
std::map< Size, std::vector< T > > data_
Real getT0(Size i, Size d) const override
Get a T0 value from the cube using index.
std::vector< QuantLib::Date > dates_
void setT0(Real value, Size i, Size d) override
Set a value in the cube using index.
Size numDates() const override
void set(Real value, Size i, Size j, Size k, Size d) override
Set a value in the cube using index.
Size samples() const override
std::map< std::string, Size > ids_
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.
SafeStack< ValueType > value