29 const Matrix& fwdCorrelation,
30 const std::vector<Time>& rateTimes)
31 : numberOfRates_(rateTimes.empty() ? 0 : rateTimes.size()-1),
32 fwdCorrelation_(fwdCorrelation),
33 rateTimes_(rateTimes),
34 times_(numberOfRates_) {
38 "Rate times must contain at least two values");
41 ") and fwdCorrelation rows (" << fwdCorrelation.
rows() <<
")");
44 ") and fwdCorrelation columns (" << fwdCorrelation.
columns() <<
")");
51 const Matrix& fwdCorrelation) {
62 for (
Size j=k; j<i; ++j) {
64 fwdCorrelation[i-k][j-k];
71 const std::vector<Time>&
76 const std::vector<Time>&
81 const std::vector<Matrix>&
Matrix used in linear algebra.
const std::vector< Time > & rateTimes() const override
TimeHomogeneousForwardCorrelation(const Matrix &fwdCorrelation, const std::vector< Time > &rateTimes)
const std::vector< Time > & times() const override
std::vector< Time > times_
std::vector< Time > rateTimes_
static std::vector< Matrix > evolvedMatrices(const Matrix &fwdCorrelation)
const std::vector< Matrix > & correlations() const override
Size numberOfRates() const override
std::vector< Matrix > correlations_
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero
pseudo square root of a real symmetric matrix