You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question on the setup of the tridiagonal system in the cubic
interpolation (under the choice 'Spline' for derivative approximation. The
tridiagonal system looks a bit different from the one suggested in the
literature. In particular, the middle components of the vector tmp_, the
right hand side vector of tridiagonal system, are caculated as:
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.
Hi,
I have a question on the setup of the tridiagonal system in the cubic
interpolation (under the choice 'Spline' for derivative approximation. The
tridiagonal system looks a bit different from the one suggested in the
literature. In particular, the middle components of the vector tmp_, the
right hand side vector of tridiagonal system, are caculated as:
<http://quantlib.sourcearchive.com/documentation/1.1-1/namespaceQuantLib_af4cc4ef40b52c17cc455ead2a97aedb3.html#af4cc4ef40b52c17cc455ead2a97aedb3>
i=0; i<n_-1; ++i) {
dx[i] = this->xBegin_[i+1] - this->xBegin_[i];
S[i] = (this->yBegin_[i+1] - this->yBegin_[i])/dx[i];
}
{
TridiagonalOperator
for (Size
=1; i<n_-1; ++i) {
L.setMidRow(i, dx[i], 2.0*(dx[i]+dx[i-1]), dx[i-1]);
tmp[i] = 3.0*(dx[i]*S[i-1] + dx[i-1]*S[i]);
}
Following the literature
L.setMidRow(i, dx[i-1], 2.0*(dx[i]+dx[i-1]), dx[i]);
tmp[i] = 3.0*(S[i] - S[i-1]);
Am I missing something here? Or any reference you can point me to
which derive what Quantlib implements?
Thanks,
The text was updated successfully, but these errors were encountered: