12#ifndef NDARRAY_ArrayBaseN_h_INCLUDED
13#define NDARRAY_ArrayBaseN_h_INCLUDED
28template <typename Derived, int N = ArrayBase<Derived>::ND::value>
32 typedef typename Super::Core Core;
33 typedef typename Super::CorePtr CorePtr;
37 template <
typename T_,
int N_,
int C_>
friend class Array;
38 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
40 Super::operator=(other);
50template <
typename Derived>
54 typedef typename Super::Core Core;
55 typedef typename Super::CorePtr CorePtr;
59 Element & operator()(
int n0)
const {
64 template <
typename T_,
int N_,
int C_>
friend class Array;
65 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
68 Super::operator=(other);
71 template <
typename Other>
80template <
typename Derived>
84 typedef typename Super::Core Core;
85 typedef typename Super::CorePtr CorePtr;
89 Element & operator()(
int n0,
int n1)
const {
94 template <
typename T_,
int N_,
int C_>
friend class Array;
95 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
98 Super::operator=(other);
101 template <
typename Other>
104 ArrayBaseN(Element * data, CorePtr
const & core) :
Super(data, core) {}
110template <
typename Derived>
114 typedef typename Super::Core Core;
115 typedef typename Super::CorePtr CorePtr;
119 Element & operator()(
int n0,
int n1,
int n2)
const {
120 return this->
operator[](makeVector(n0, n1, n2));
124 template <
typename T_,
int N_,
int C_>
friend class Array;
125 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
128 Super::operator=(other);
131 template <
typename Other>
134 ArrayBaseN(Element * data, CorePtr
const & core) :
Super(data, core) {}
140template <
typename Derived>
144 typedef typename Super::Core Core;
145 typedef typename Super::CorePtr CorePtr;
149 Element & operator()(
int n0,
int n1,
int n2,
int n3)
const {
150 return this->
operator[](makeVector(n0, n1, n2, n3));
154 template <
typename T_,
int N_,
int C_>
friend class Array;
155 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
158 Super::operator=(other);
161 template <
typename Other>
164 ArrayBaseN(Element * data, CorePtr
const & core) :
Super(data, core) {}
170template <
typename Derived>
174 typedef typename Super::Core Core;
175 typedef typename Super::CorePtr CorePtr;
179 Element & operator()(
int n0,
int n1,
int n2,
int n3,
int n4)
const {
180 return this->
operator[](makeVector(n0, n1, n2, n3, n4));
184 template <
typename T_,
int N_,
int C_>
friend class Array;
185 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
188 Super::operator=(other);
191 template <
typename Other>
194 ArrayBaseN(Element * data, CorePtr
const & core) :
Super(data, core) {}
200template <
typename Derived>
204 typedef typename Super::Core Core;
205 typedef typename Super::CorePtr CorePtr;
209 Element & operator()(
int n0,
int n1,
int n2,
int n3,
int n4,
int n5)
const {
210 return this->
operator[](makeVector(n0, n1, n2, n3, n4, n5));
214 template <
typename T_,
int N_,
int C_>
friend class Array;
215 template <
typename T_,
int N_,
int C_>
friend class ArrayRef;
218 Super::operator=(other);
221 template <
typename Other>
224 ArrayBaseN(Element * data, CorePtr
const & core) :
Super(data, core) {}
Definitions for ArrayBase.
An intermediate CRTP base class for Array and ArrayRef.
Definition ArrayBaseN.h:29
CRTP implementation for Array and ArrayRef.
Definition ArrayBase.h:43
Reference operator[](Size n) const
Return a single subarray.
Definition ArrayBase.h:75
Traits::Element Element
Data type of array elements.
Definition ArrayBase.h:50
A proxy class for Array with deep assignment operators.
Definition ArrayRef.h:34
A multidimensional strided array.
Definition Array.h:35