Toshi
02-17-2003, 07:54 AM
Hi!
I have a problem with an index running over the bounds in the hqr routine...
in the beginning, n is set to the number of rows:
int n=a.rows();
then nn is set to the maximal index:
nn = n-1;
later, doing the column modification, there is an access to:
a[i][k+2]
and the only check before that is:
if (k != nn)
But if k=nn-1, then k+2 = nn+1, and therefore out of bounds...
Is that a typo? Is it supposed to be k+1?
Did I miss something along the way?
Can someone please fill me in?
Thanks, Toshi
I have a problem with an index running over the bounds in the hqr routine...
in the beginning, n is set to the number of rows:
int n=a.rows();
then nn is set to the maximal index:
nn = n-1;
later, doing the column modification, there is an access to:
a[i][k+2]
and the only check before that is:
if (k != nn)
But if k=nn-1, then k+2 = nn+1, and therefore out of bounds...
Is that a typo? Is it supposed to be k+1?
Did I miss something along the way?
Can someone please fill me in?
Thanks, Toshi