12 #if defined(__TURBOC__)
50 for (
int i = min; i <=
max; ++i)
78 for (
int i = min; i <=
max; ++i)
100 assert(sz > 0 && sz <= INT_MAX);
103 for (
unsigned int i = 0; i < sz; i++)
122 #ifdef SAFE_INITIALIZE
127 cout <<
" Allocating dvar_vector with ptr_address\n "
167 unsigned int size = (
unsigned int)(max - min + 1);
170 ad_printf(
"Current maximum number of independent variables is %d\n",
172 ad_printf(
" You need to increase the global variable "
173 "MAX_NVAR_OFFSET to %d\n", size);
174 ad_printf(
" This can be done by putting the line\n"
175 " gradient_structure::set_MAX_NVAR_OFFSET(%d);\n", size);
176 ad_printf(
" before the declaration of the gradient_structure object.\n"
177 " or the command line option -mno %d\n", size);
193 for (
int i = min; i <=
max; ++i)
195 unsigned int tmp = (
unsigned int)(i - min);
208 ostream& s= (ostream&) _s;
263 cerr <<
"Trying to alocate to an already allocated dvar_vector" <<
endl;
280 unsigned int itemp = (
unsigned int)(nch - ncl + 1);
284 cerr <<
"Error in dvar_vector constructor max index must be"
286 <<
"minindex = " << ncl <<
" maxindex = " << nch <<
endl;
293 cerr <<
"Error: instance of gradient_structure is a nullptr.\n";
298 cerr <<
" Error trying to allocate memory for dvar_vector\n";
305 cerr <<
"Error trying to allocate memory for dvar_vector\n";
312 myheapcheck(
"Leaving dvar_vector::allocate(ncl,nch)");
indvar_offset_list * INDVAR_LIST
dvar_vector()
Default constructor.
void myheapcheck(char *msg)
Does nothing.
double * v
pointer to the data
double_and_int * arr_new(unsigned int sz)
void allocatec(const dvar_vector &)
Description not yet available.
dvar_vector & shift(int min)
Description not yet available.
Description not yet available.
friend void make_indvar_list(const dvar_vector &)
Description not yet available.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
void allocate(void)
Does not allocate, but initializes dvar_vector to empty.
static unsigned int MAX_NVAR_OFFSET
Holds the data for the prevariable class.
prnstream & endl(prnstream &)
Description not yet available.
int indexmax() const
Get maximum valid index.
void make_indvar_list(const dvar_vector &t)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static _THREAD gradient_structure * _instance
unsigned int ncopies
Copy counter to enable shallow copies.
void initialize(void)
Description not yet available.
void put_address(unsigned int &i, double *iaddress)
Holds "shape" information for vector objects.
void shift(int min)
Description not yet available.
void make_indvar_list(const dvar_vector &t)
Description not yet available.
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
int ad_printf(FILE *stream, const char *format, Args...args)
double x
< value of the variable
void copy_status(const ostream &_s, const dvar_vector &v)
Description not yet available.