26 for (
int i=imin+1;i<=imax;i++)
28 int jmin=
admax(imin,i-bw+1);
30 for (
int j=jmin;j<=i-1;j++)
118 for (i=2;i<=imax;i++)
120 int jmin=
admax(1,i-bw+1);
121 for (
int j=jmin;j<=i-1;j++)
123 ssum(i)+=m(i,j)*
x(j);
125 x(i)=(v(i)-ssum(i))/m(i,i);
128 for (i=imax;i>=2;i--)
130 int jmin=
admax(1,i-bw+1);
132 dfv(i)+=dfx(i)/m(i,i);
133 dfsum(i)-=dfx(i)/m(i,i);
134 dfm(i,i)-=dfx(i)*(v(i)-ssum(i))/(m(i,i)*m(i,i));
136 for (
int j=i-1;j>=jmin;j--)
139 dfm(i,j)+=dfsum(i)*
x(j);
140 dfx(j)+=dfsum(i)*m(i,j);
148 dfv(imin)+=dfx(imin)/m(imin,imin);
149 dfm(imin,imin)-=dfx(imin)*v(imin)/(m(imin,imin)*m(imin,imin));
Description not yet available.
double & elem_value(int i)
void save_dmatrix_derivatives(const dvar_matrix_position &) const
Description not yet available.
Vector of double precision numbers.
Description not yet available.
int bandwidth(void) const
void save_dvector_derivatives(const dvar_vector_position &pos) const
Puts the derivative values in a dvector into a dvar_vector's guts.
Description not yet available.
double & elem_value(int i, int j)
void initialize(void)
Description not yet available.
void verify_identifier_string(const char *)
Verifies gradient stack string.
void set_gradient_stack(void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
Description not yet available.
int bandwidth(void) const
dvector solve(const dmatrix &aa, const dvector &z)
Solve a linear system using LU decomposition.
void save_dvar_vector_value(const dvar_vector &v)
dvar_vector_position restore_dvar_vector_position()
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
void dfbltsolve(void)
Description not yet available.
void initialize(void)
Initialze all elements of dvector to zero.
int save_identifier_string(const char *)
Writes a gradient stack verification string.
dvector restore_dvar_vector_value(const dvar_vector_position &tmp)
Restores the size, address, and value information for a dvar_vector.
void save_dvar_vector_position(const dvar_vector &v)
dvar_matrix_position restore_dvar_matrix_position()
static _THREAD DF_FILE * fp
void save_dvar_matrix_position(const dvar_matrix &m)
Stores the adjoint gradient data that will be processed by gradcalc.
dvector restore_dvar_vector_derivatives(const dvar_vector_position &tmp)
Description not yet available.
void save_dvar_matrix_value(const dvar_matrix &m)
static _THREAD grad_stack * GRAD_STACK1
banded_lower_triangular_dmatrix restore_banded_lower_triangular_dvar_matrix_value(const dvar_matrix_position &mpos)
Description not yet available.
Description not yet available.