|
Ublas : |
From: Dima Sorkin (dsorkin_at_[hidden])
Date: 2007-10-24 04:12:58
Quoting Nuno Sucena Almeida:
> Hi,
> I looked at your code, and I see a small thing that might be incorrect,
> but pardon me if I'm seeing it wrong:
>
> file: eigen_solvers_wrappers.cc
> line 132: range_t(workd,range(ipntr[0],ipntr[0]+n)),
> line 138: range_t mult_target(workd,range(ipntr[1],ipntr[1]+n));
>
> shouldn't you have instead:
> range_t(workd,range(ipntr[0]-1,ipntr[0]+n-1))
>
> the same for the other, to account for the fact that ipntr[0] will give the
> value 1 for the first element of the vector (fortran style) ?
> I'm asking this because I have a similar implementation, but using the
> extra -1 term. I didn't check the rest of the code though,
Hi.
Thank you. Looks like a bug in my code.
The array index "ipntr" is of Fortran, I missed it.
I think I shall conduct an experiment (to run this code printing indices),
to be 100% sure that ARPACK really generates it in Fortran index convention,
like it should.
Regards,
Dima.