22 #ifndef TNT_FORTRAN_ARRAY1D_H
23 #define TNT_FORTRAN_ARRAY1D_H
28 #ifdef TNT_BOUNDS_CHECK
52 void copy_(T* p,
const T* q,
int len)
const;
53 void set_(T* begin, T* end,
const T& val);
73 inline int dim1()
const;
74 inline int dim()
const;
96 std::cout <<
"Created Fortran_Array1D(const Fortran_Array1D<T> &A) \n";
106 std::cout <<
"Created Fortran_Array1D(int n) \n";
114 std::cout <<
"Created Fortran_Array1D(int n, const T& val) \n";
124 std::cout <<
"Created Fortran_Array1D(int n, T* a) \n";
131 #ifdef TNT_BOUNDS_CHECK
141 #ifdef TNT_BOUNDS_CHECK
154 set_(data_, data_+n_, a);
162 copy_(A.
data_, data_, n_);
172 copy_(data_, A.
data_, n_);
215 return v_.ref_count();
222 std::cout <<
"entered subarray. \n";
224 if (((i0 > 0) && (i1 < n_)) || (i0 <= i1))
235 std::cout <<
"subarray: null return.\n";
248 for (T* p=begin; p<end; p++)
Definition: tnt_fortran_array1d.h:40
Fortran_Array1D & operator=(const Fortran_Array1D &A)
Fortran_Array1D< T > subarray(int i0, int i1)
Definition: tnt_fortran_array1d.h:219
T value_type
Definition: tnt_fortran_array1d.h:58
void copy_(T *p, const T *q, int len) const
Definition: tnt_fortran_array1d.h:254
Fortran_Array1D & inject(const Fortran_Array1D &A)
Definition: tnt_fortran_array1d.h:169
int dim1() const
Definition: tnt_fortran_array1d.h:201
Fortran_Array1D & ref(const Fortran_Array1D &A)
Definition: tnt_fortran_array1d.h:182
Fortran_Array1D()
Definition: tnt_fortran_array1d.h:89
~Fortran_Array1D()
Definition: tnt_fortran_array1d.h:207
T & operator()(int i)
Definition: tnt_fortran_array1d.h:129
i_refvec< T > v_
Definition: tnt_fortran_array1d.h:44
Fortran_Array1D & operator=(const T &a)
Definition: tnt_fortran_array1d.h:152
T * data_
Definition: tnt_fortran_array1d.h:46
Fortran_Array1D copy() const
Definition: tnt_fortran_array1d.h:159
int dim() const
Definition: tnt_fortran_array1d.h:204
void set_(T *begin, T *end, const T &val)
Definition: tnt_fortran_array1d.h:246
Fortran_Array1D(const Fortran_Array1D &A)
int n_
Definition: tnt_fortran_array1d.h:45
int ref_count() const
Definition: tnt_fortran_array1d.h:213
Definition: tnt_i_refvec.h:56
Definition: tnt_array1d.h:36