14 #if defined (__WAT32__)
25 typedef __int64 ssize_t;
31 #include <sys/types.h>
35 #if defined(__TURBOC__)
43 #include <iostream.hpp>
44 #define S_IREAD 0000400
45 #define S_IWRITE 0000200
48 #if !defined(OPT_LIB) || defined(__MINGW64__) || defined(_MSC_VER)
59 int LSEEK(
int,
int,
int);
60 int open(
const char*,
int);
61 int creat(
const char*,
int);
63 int write(
int,
char*,
int);
70 #include <sys/types.h>
153 ptr=
new double [(
n*(
n+1))/2];
162 for (
int i=1;i<=
n;i++)
200 ptr = (
double*)(const_cast<gradient_structure&>(gs).ARR_LIST1->ARRAY_MEMBLOCK_BASE);
207 for (
int i=1;i<=
n;i++)
244 #if !defined(OPT_LIB) || defined(__INTEL_COMPILER)
252 double * tmp=
m[i]+j;
253 if (tmp < minp || tmp >
maxp)
255 cerr <<
"Index out of bounds in double& dfsdmat::elem(int i,int j)"
268 double * tmp=
m[i]+j;
269 if (tmp < minp || tmp >
maxp)
271 cerr <<
"Index out of bounds in double& dfsdmat::elem(int i,int j)"
285 double * p=((
dfsdmat&)m).getminp();
288 for (
int i=1;i<=nn;i++)
307 for (
int i=1;i<=nn;i++)
320 tmp_file=open(
"fmm_tmp.tmp", O_RDWR | O_CREAT | O_TRUNC |
324 cerr <<
"error trying to open temporary hessian file\n";
329 unsigned int _n = (
unsigned int)
size();
330 unsigned int nn = (_n*(_n+1))/2;
338 size_t size = nn *
sizeof(double);
339 assert(size <= UINT_MAX);
346 cerr <<
"Error writing to temporary hess file in dfsdmat::save()"
371 #if defined(OPT_LIB) && !defined(_MSC_VER)
380 assert(_n <
sqrt(INT_MAX));
383 size_t nn = (size_t)((_n * (_n + 1))/2);
386 size_t size = nn *
sizeof(double);
387 assert(size <= UINT_MAX);
394 cerr <<
"Error reading from temporary hess file in dfsdmat::save()"
void read(const test_smartlist &, void *, int nsize)
void save(void)
Save values to file.
double & operator()(int i, int j)
Description not yet available.
void allocate(void)
Initialize members but does not allocate.
void deallocate(void)
Description not yet available.
prnstream & endl(prnstream &)
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static _THREAD gradient_structure * _instance
dfsdmat()
Default constructor.
void restore(void)
Restore values to file.
static long int get_USE_FOR_HESSIAN()
void write(const test_smartlist &, void *, int nsize)
istream & operator>>(const istream &input, const d3_array &arr3)
Read values from input stream into arr3.
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
double & elem(int i, int j)
Description not yet available.
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.