43 #ifndef AFF_SIMPLEARRAY_H_VERSION 45 #define AFF_SIMPLEARRAY_H_VERSION \ 46 "AFF_SIMPLEARRAY_H V1.4" 93 template<
class T, Tsize N>
155 T& operator[](
const Tsubscript& i) {
return Marray[i]; }
177 template<
typename T, Tsize N>
182 template<
typename T, Tsize N>
187 template<
typename T, Tsize N>
193 template<
typename T, Tsize N>
199 template<
typename T1,
typename T2, Tsize N>
205 template<
typename T, Tsize N>
211 template<
typename T1,
typename T2, Tsize N>
217 template<
typename T, Tsize N>
224 #endif // AFF_SIMPLEARRAY_H_VERSION (includeguard) Root namespace of library.
some typedefs we refer to
T inline_product(const SimpleRigidArray< T, N > &array)
Product of all elements.
T * pointer()
pointer access
static T product(const T *array)
calculate product of all elements
bool inline_anysmaller(const SimpleRigidArray< T, N > &A, const SimpleRigidArray< T, N > &B)
Returns true if any of A is smaller than corresponding B.
bool inline_anylarger(const SimpleRigidArray< T, N > &A, const SimpleRigidArray< T, N > &B)
Returns true if any of A is larger than corresponding B.
static T innerproduct(const T *A, const T *B)
calculate inner product
T inline_strideproduct(const SimpleRigidArray< T, N > &A, const SimpleRigidArray< T, N > &B)
Returns strided product.
A very basic rigid array class (with deep inline copy).
const T & operator[](const Tsubscript &i) const
const access
static void set(T1 *array, const T2 &value)
set all elements to value
T inline_sum(const SimpleRigidArray< T, N > &array)
Sum of all elements.
Tsize size() const
size of array
SimpleRigidArray(const SimpleRigidArray< TT, N > &array)
copy with deep inline copy
static bool anylarger(const T1 *A, const T2 *B)
true if ony of A is larger than corresponding B
SimpleRigidArray(const T &value)
set constructor
static void copy(const T1 *source, T2 *target)
copy all values from source to target
const T * pointer() const
const pointer access
static void set(T *array, const T &value)
set all elements to value
SimpleRigidArray & operator=(const SimpleRigidArray< TT, N > &array)
copy with deep inline copy
static bool anylarger(const T *A, const T *B)
true if ony of A is larger than corresponding B
static bool anysmaller(const T *A, const T *B)
true if ony of A is smaller than corresponding B
T inline_innerproduct(const SimpleRigidArray< T, N > &A, const SimpleRigidArray< T, N > &B)
Returns inner product.
ptrdiff_t Tsubscript
Type to hold an array's subscript value.
static T strideproduct(const T *A, const T *B)
calculate stride product
SimpleRigidArray & operator=(const TT &value)
copy a value to all positions
static T1 innerproduct(const T1 *A, const T2 *B)
calculate inner product
raw array function templates
static T sum(const T *array)
calculate sum of all elements
size_t Tsize
Type to hold the size of an array dimension.