Re: Confusion in using BicubicSplineInterpolation
Posted by
amar singh on
URL: http://quantlib.414.s1.nabble.com/Confusion-in-using-BicubicSplineInterpolation-tp2714p2717.html
Luigi,
I have a minor suggestion, which could prevent mistakes and hard to track bugs in using the matrix - It should throw an error for out of range access.
I think it would be helpful in avoiding mistakes in use.eg., If the matrix element accesses a pointer outside its allocation range, it could be quite upredictable and very hard to debug.
BTW, your 'state of the art' Matrix class looks really excellent!
Regards,
Amar
Ligui,
Thank you very much for your help, and sorry for creating the confusion.
It does work perfect, only I was not aware .
Thanks,
At 12:41 AM 10/14/03, amar singh wrote:
>I observed a strange thing in using the class.
>Am I using it wrongly, or could there possibly be some problem?
>
>Following is the code:
> {
> std::vector x(5);
> ...
> std::vector y(6);
> ...
> Math::Matrix z(x.size(),y.size());
Amar,
we'll have to document it better. When I wrote it, I visualized
the thing as on two Carthesian axes:
[yM] [ ]
|. | | |
|. | | Z matrix |
|. | | |
|y2| | |
[y1] [ |
[ x1 x2 . . . xN ]
Therefore, the i-th y-value corresponds to the i-th row, and the j-th
x-value to the j-th column. The constructor of Matrix being:
Matrix(Size rows, Size columns);
the constructor call in your code should be:
Matrix(y.size(), x.size())
Please, if anyone feels it's the wrong way
around, just tell me so that we
can change the parameter order...
Later,
Luigi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Quantlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search