78 for (
int i=mmin;i<=mmax;i++)
90 for (
int i=mmin;i<=mmax;i++)
92 cv(i)=*(v(i).get_udot());
102 for (
int i=mmin;i<=mmax;i++)
104 cv(i)=*(v(i).get_udot2());
114 for (
int i=mmin;i<=mmax;i++)
116 cv(i)=*(v(i).get_udot3());
125 for (
int i=mmin;i<=mmax;i++)
156 static_cast<unsigned int>(max < min ? 0 : max - min + 1)];
159 cerr <<
"error allocating memory in df3_one_vector\n";
164 cerr <<
"Error trying to allocate memory for df3_one_vector\n";
185 for (
int i=rmin;i<=rmax;i++)
190 for (
int j=cmin;j<=cmax;j++)
192 cm(i,j)=
value(v(i,j));
203 for (
int i=rmin;i<=rmax;i++)
218 for (
int i=rmin;i<=rmax;i++)
233 for (
int i=rmin;i<=rmax;i++)
287 for (
int i=mmin;i<=mmax;i++)
308 static_cast<unsigned int>(rmax < rmin ? 0 : rmax - rmin + 1)];
311 cerr <<
"error allocating memory in df3_one_matrix" <<
endl;
316 cerr <<
"Error trying to allocate memory for df3_one_vector\n";
320 for (
int i = rmin; i<= rmax; ++i)
392 double xinv=1.0/(*x.
get_u());
394 double zp2=-0.5*zp*xinv;
395 double zp3=-1.5*zp2*xinv;
434 double xp=1.0/(*x.
get_u());
436 double xp3=-2.0*xp*xp2;
454 double xinv=1.0/(*x.
get_u());
455 double zp=-xinv*xinv;
456 double zp2=-2.0*zp*xinv;
457 double zp3=-3.0*zp2*xinv;
672 int cmin=
M(rmin).indexmin();
674 int cmax=
M(rmin).indexmax();
675 if (rmin !=1 || cmin !=1)
677 cerr <<
"minimum row and column inidices must equal 1 in "
678 "df1b2matrix choleski_decomp(const df3_one_atrix& MM)"
684 cerr <<
"Error in df1b2matrix choleski_decomp(const df3_one_matrix& MM)"
685 " Matrix not square" <<
endl;
691 #ifndef SAFE_INITIALIZE
700 cerr <<
"Error matrix not positive definite in choleski_decomp"
708 L(i,1)=
M(i,1)/L(1,1);
730 cerr <<
"Error matrix not positive definite in choleski_decomp"
747 cerr <<
"unequal shape in "
748 "df1b2matrix& df1b2matrix::operator = (const df3_one_matrix& M)"
753 for (
int i=rmin;i<=rmax;i++)
766 cerr <<
"unequal shape in "
767 "df1b2vector& df1b2vector::operator = (const df3_one_vector& M)"
772 for (
int i=rmin;i<=rmax;i++)
811 const double b1=0.319381530;
812 const double b2=-0.356563782;
813 const double b3=1.781477937;
814 const double b4=-1.821255978;
815 const double b5=1.330274429;
816 const double p=.2316419;
843 const double b1=0.319381530;
844 const double b2=-0.356563782;
845 const double b3=1.781477937;
846 const double b4=-1.821255978;
847 const double b5=1.330274429;
848 const double p=.2316419;
init_df3_one_variable(const df1b2variable &)
Construct init_df3_one_variable from _var.
df1b2_gradlist * f1b2gradlist
void * trueptr
Address of first element in the vector.
Description not yet available.
double * get_udot3(void) const
df3_one_vector(void)
Default constructor.
double * get_udot(void) const
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void allocate(void)
Does NOT allocate, but initializes empty df3_one_vector.
df1b2variable & operator=(const df3_one_variable &v)
d3_array operator-(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
double bounded_cumd_norm(const double x, double beta)
Description not yet available.
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
Description not yet available.
d3_array operator+(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
d3_array cube(const d3_array &m)
Description not yet available.
double * get_udot2(void) const
df3_one_matrix(int rmin, int rmax, int cmin, int cmax)
~df3_one_matrix()
Destructor.
Description not yet available.
df1b2matrix & operator=(const df3_one_matrix &)
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
double * get_u(void) const
df1b2vector & operator=(const df3_one_vector &)
prnstream & endl(prnstream &)
df3_one_variable & operator+=(const df3_one_variable &v)
Subtract v values from df3_one_variable u, udot, udot2 and udot3.
~df3_one_vector()
Destructor.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double var(const dvector &vec)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dmatrix second_derivatives(const df1_one_matrix &v)
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
dvariable beta(const prevariable &a, const prevariable &b)
Beta density function.
dvector first_derivatives(const df1_one_vector &v)
Description not yet available.
Description not yet available.
unsigned int ncopies
Copy counter to enable shallow copies.
int write_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, df1b2function2 *pf)
Description not yet available.
Holds "shape" information for vector objects.
Description not yet available.
df3_one_variable()
Default constructor.
df3_one_variable & operator=(const df3_one_variable &v)
Description not yet available.
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
dmatrix third_derivatives(const df1_one_matrix &v)
dvector value(const df1_one_vector &v)
void deallocate(void)
Deallocate df3_one_vector, then set to empty.
double cumd_norm(const double &x)
Culative normal distribution; constant objects.
df3_one_variable & operator-=(const df3_one_variable &v)
Subtract _v values from df3_one_variable u, udot, udot2 and udot3.
static df1b2variable * ind_var
void deallocate(void)
Deallocate df3_one_matrix, then set to empty.
double square(const double value)
Return square of value; constant object.
df1_one_variable inv(const df1_one_variable &x)
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.