92 for (
int i=mmin;i<=mmax;i++)
107 for (
int i=mmin;i<=mmax;i++)
141 static_cast<unsigned int>(max < min ? 0 : max - min + 1)];
144 cerr <<
"error allocating memory in df1_two_vector\n";
149 cerr <<
"Error trying to allocate memory for df1_two_vector\n";
174 for (
int i=rmin;i<=rmax;i++)
179 for (
int j=cmin;j<=cmax;j++)
181 cm(i,j)=
value(v(i,j));
245 for (
int i=mmin;i<=mmax;i++)
264 static_cast<unsigned int>(rmax < rmin ? 0 : rmax - rmin + 1)];
267 cerr <<
"error allocating memory in df1_two_matrix\n";
272 cerr <<
"Error trying to allocate memory for df1_two_vector\n";
275 for (
int i = rmin; i <= rmax; ++i)
306 double tmp=1.0/
value(y);
407 double f_u,
double f_v)
444 double d=1.0/(1+
square(cx));
511 double zp=1/(*x.
get_u());
557 double xinv=1.0/(*x.
get_u());
559 double zp=-xinv*xinv;
599 double f_u=*y.
get_u();
600 double f_v=*x.
get_u();
774 cerr <<
"can only have 2 independent_variables in df1_two_variable"
794 cerr <<
"illegal num_ind_var value of " <<
num_ind_var
795 <<
" in df1_two_variable function" <<
endl;
822 int cmin=
M(rmin).indexmin();
824 int cmax=
M(rmin).indexmax();
825 if (rmin !=1 || cmin !=1)
827 cerr <<
"minimum row and column inidices must equal 1 in "
828 "df1b2matrix choleski_decomp(const df1_two_atrix& MM)"
834 cerr <<
"Error in df1b2matrix choleski_decomp(const df1_two_matrix& MM)"
835 " Matrix not square" <<
endl;
841 #ifndef SAFE_INITIALIZE
850 cerr <<
"Error matrix not positive definite in choleski_decomp"
858 L(i,1)=
M(i,1)/L(1,1);
880 cerr <<
"Error matrix not positive definite in choleski_decomp"
Base class for dvariable.
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
Description not yet available.
void * trueptr
Address of first element in the vector.
df1_two_variable & operator=(const df1_two_variable &v)
Description not yet available.
Description not yet available.
df1_two_variable & operator*=(double v)
Mulitiply value v with values in df1_two_variable.
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 df1_two_vector.
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).
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
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).
df1_one_variable atan(const df1_one_variable &x)
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
df1_two_variable fabs(const df1_two_variable &x)
void set_derivatives(df1_one_variable &z, const df1_one_variable &x, double u, double zp)
void initialize(void)
Description not yet available.
df1_two_variable & operator+=(const df1_two_variable &v)
Description not yet available.
void deallocate(void)
Description not yet available.
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
df1_two_variable & operator/=(const df1_two_variable &v)
Description not yet available.
init_df1_two_variable(const prevariable &)
Description not yet available.
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
void deallocate(void)
Description not yet available.
~df1_two_matrix()
Description not yet available.
df1_two_vector(void)
Default constructor.
prnstream & endl(prnstream &)
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
df1_two_variable()
Default constructor.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Description not yet available.
unsigned int ncopies
Copy counter to enable shallow copies.
void initialize(void)
Description not yet available.
Description not yet available.
df1_two_variable & operator-=(const df1_two_variable &v)
Description not yet available.
Description not yet available.
Holds "shape" information for vector objects.
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
static prevariable * ind_var[]
Description not yet available.
df1_two_matrix(int rmin, int rmax, int cmin, int cmax)
Construct matrix of df1_two_variable with dimension [rmin to rmax] x [cmin to cmax].
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
dvector value(const df1_one_vector &v)
~df1_two_vector()
Destructor.
void deallocate(void)
Description not yet available.
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.
~init_df1_two_variable()
Description not yet available.
d3_array pow(const d3_array &m, int e)
Description not yet available.