32 template<
typename datatype,
int ndim>
class Ndarray;
35 template<
typename datatype,
int ndim>
42 template<
typename datatype>
45 typedef datatype& returnType;
52 template<
typename datatype,
int ndim>
61 Ndarray(datatype *data,
long *shape,
long *strides);
64 long getShape(
const int axis);
71 template<
typename datatype,
int ndim>
76 this->strides = strides;
82 template<
typename datatype,
int ndim>
85 this->data = array.data;
86 this->shape = array.shape;
87 this->strides = array.strides;
93 template<
typename datatype,
int ndim>
96 this->data = array.data;
97 this->shape = array.shape;
98 this->strides = array.strides;
104 template<
typename datatype,
int ndim>
107 return this->shape[axis];
117 template<
typename datatype,
int ndim>
121 return Ndarray<datatype, ndim-1>(&this->data[i*this->strides[0]], &this->shape[1], &this->strides[1]);
132 template<
typename datatype>
141 Ndarray(datatype *data,
long *shape,
long *strides);
144 long getShape(
const int axis);
151 template<
typename datatype>
156 this->strides = strides;
163 template<
typename datatype>
166 this->data = array.data;
167 this->shape = array.shape;
168 this->strides = array.strides;
175 template<
typename datatype>
178 this->data = array.data;
179 this->shape = array.shape;
180 this->strides = array.strides;
187 template<
typename datatype>
190 return this->shape[axis];
197 template<
typename datatype>
201 return this->data[i*this->strides[0]];
Definition: ndarray.h:133