Revision 1486 trunk/src/linad99/fvar_m20.cpp

fvar_m20.cpp (revision 1486)
25 25
    \n\n The implementation of this algorithm was inspired by
26 26
    "Numerical Recipes in C", 2nd edition,
27 27
    Press, Teukolsky, Vetterling, Flannery, chapter 2
28

  
29
    Edited by Steve Martell on Dec 30, 2013 to address a bug
30
    where the lower bound of the square dvar_matrix was greater than 1.
28 31
*/
29 32
dvariable det(const dvar_matrix& aa)
30 33
{
......
129 132
    }
130 133
  }
131 134
  double det=d;
132
  part_prod(1)=d*bb(1,1);
135

  
136
  // SM Bug 129, issue appears to be at this line
137
  // part_prod is declared above as dvector(lb,ub)
138
  // cout<<"Bug 129 ="<<part_prod(lb)<<endl;
139
  // part_prod(1)=d*bb(1,1);  // replaced this line with:
140
  part_prod(lb) = d*bb(lb,lb);
141
  // cout<<"Ok got this far; det = "<<det<<endl;
133 142
  for (j=lb+1;j<=ub;j++)
134 143
  {
135 144
    part_prod(j)=part_prod(j-1)*bb(j,j);

Also available in: Unified diff