22 int mmin=v1(v1.
indexmin()).indexmin();
23 int mmax=v1(v1.
indexmin()).indexmax();
30 for (
int ii=rmin; ii<=rmax; ii++)
32 for (
int i=mmin; i<=mmax; i++)
36 for (
int j=mmin; j<=mmax; j++)
46 for (
int i=mmin; i<=mmax; i++)
48 for (
int j=mmin; j<=mmax; j++)
86 int mmin=v1(v1.
indexmin()).indexmin();
87 int mmax=v1(v1.
indexmin()).indexmax();
91 dmatrix dfv1(rmin,rmax,mmin,mmax);
93 for (
int i=mmin; i<=mmax; i++)
95 for (
int j=mmin; j<=mmax; j++)
101 for (
int ii=rmin; ii<=rmax; ii++)
103 for (
int i=mmin; i<=mmax; i++)
105 if (!missflags(ii,i))
107 for (
int j=mmin; j<=mmax; j++)
109 if (!missflags(ii,j))
112 dfv1(ii,i)+=dftmp(i,j)*v1(ii,j);
113 dfv1(ii,j)+=dftmp(i,j)*v1(ii,i);
130 int mmin=v1(v1.
indexmin()).indexmin();
131 int mmax=v1(v1.
indexmin()).indexmax();
137 int nobs=rmax-rmin+1;
138 for (
int ii=rmin; ii<=rmax; ii++)
140 for (
int i=mmin; i<=mmax; i++)
142 for (
int j=mmin; j<=mmax; j++)
148 for (
int i=mmin; i<=mmax; i++)
150 for (
int j=mmin; j<=mmax; j++)
183 int mmin=v1(v1.
indexmin()).indexmin();
184 int mmax=v1(v1.
indexmin()).indexmax();
188 dmatrix dfv1(rmin,rmax,mmin,mmax);
190 int nobs=rmax-rmin+1;
191 for (
int i=mmin; i<=mmax; i++)
193 for (
int j=mmin; j<=mmax; j++)
196 dftmp(i,j)/=double(nobs);
199 for (
int ii=rmin; ii<=rmax; ii++)
201 for (
int i=mmin; i<=mmax; i++)
203 for (
int j=mmin; j<=mmax; j++)
206 dfv1(ii,i)+=dftmp(i,j)*v1(ii,j);
207 dfv1(ii,j)+=dftmp(i,j)*v1(ii,i);
231 for (
int i = imin; i <= imax; ++i)
235 for (
int j = jmin; j <= jmax; ++j)
237 ptmpij->
x = pv1i->
x * pv2j->
x;
287 double* pv1i = v1.
get_v() + imin;
288 double* pdfv1i = dfv1.
get_v() + imin;
289 dvector* pdftmpi = &dftmp(imin);
290 for (
int i = imin; i <= imax; ++i)
292 double* pv2j = v2.
get_v() + jmin;
293 double* pdfv2j = dfv2.
get_v() + jmin;
294 double* pdftmpij = pdftmpi->
get_v() + jmin;
295 for (
int j = jmin; j <= jmax; ++j)
298 *pdfv1i += *pdftmpij * *pv2j;
299 *pdfv2j += *pdftmpij * *pv1i;
332 double* pv1i = v1.
get_v() + imin;
333 for (
int i = imin; i <= imax; ++i)
335 for (
int j = jmin; j <= jmax; ++j)
337 ptmpi->
elem(j) = *pv1i * v2.
elem(j);
364 for (
int i = imin; i <= imax; ++i)
366 double* pv2j = v2.
get_v() + jmin;
367 for (
int j = jmin; j <= jmax; ++j)
369 ptmpi->
elem(j) = v1.
elem(i) * *pv2j;
Description not yet available.
Description not yet available.
double & elem_value(int i, int j)
Description not yet available.
void save_imatrix_position(const imatrix &m)
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
dmatrix restore_dvar_matrix_derivatives(const dvar_matrix_position &_pos)
Description not yet available.
void initialize(void)
Zero initialize allocated dvar_matrix, then saves adjoint function and position data.
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.
imatrix restore_imatrix_value(const imatrix_position &mpos)
void verify_identifier_string(const char *)
Verifies gradient stack string.
void save_int_value(int x)
Holds the data for the prevariable class.
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.
dmatrix restore_dvar_matrix_value(const dvar_matrix_position &mpos)
void save_dvar_vector_value(const dvar_vector &v)
dvar_vector_position restore_dvar_vector_position()
void RETURN_ARRAYS_INCREMENT()
dvar_matrix empirical_covariance(const dvar_matrix &v1)
Description not yet available.
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void save_dmatrix_derivatives(const dvar_matrix_position &pos) const
Description not yet available.
static _THREAD gradient_structure * _instance
dmatrix outer_prod(const dvector &v1, const dvector &v2)
Description not yet available.
Description not yet available.
void initialize(void)
Initialze all elements of dvector to zero.
void dfouter_prodvv(void)
Description not yet available.
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 dfempirical_covarv(void)
Description not yet available.
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)
void dfempirical_covarv_partial(void)
Description not yet available.
Class definition of matrix with derivitive information .
Stores the adjoint gradient data that will be processed by gradcalc.
void save_dvar_matrix_value(const dvar_matrix &m)
void RETURN_ARRAYS_DECREMENT()
void save_imatrix_value(const imatrix &m)
static _THREAD grad_stack * GRAD_STACK1
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
imatrix_position restore_imatrix_position()
void initialize(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double x
< value of the variable
Description not yet available.