20 cerr <<
" Error in adstring::adstring(int lb,int ub) : clist()\n"
21 " At present minimum index for adstring must equal 1\n";
26 for (
size_t i = 1; i <= sz; i++)
36 cerr <<
" Error in adstring::adstring(const size_t size) : clist()\n"
37 " At present size must be greater than zero.\n";
40 size_t size = sz > 0 ? (size_t)sz : 0;
42 for (
size_t i = 1; i <=
size; i++)
54 s[1] = (
unsigned char)ub;
78 for (
size_t i = 1; i <= us; i++)
82 for (
size_t i = 1; i <= vs; i++)
96 bool sign = n < 0 ?
true :
false;
98 unsigned char buf[50];
99 memset(&buf[0],
' ', 50);
104 if (nr < 0) nr *= -1;
105 buf[ii++] = (
unsigned char)nr;
112 for (
size_t i=0;i<ii;i++)
114 s[ii-i]=(
unsigned char)(buf[i]+48);
void allocate(const size_t sz)
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).
adstring itoa(int n, int d)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
adstring()
Default constructor.
double sign(const double x)
The sign of a number.