27 #ifndef SCHNEK_ARRAY_HPP_ 28 #define SCHNEK_ARRAY_HPP_ 30 #include "arraycheck.hpp" 33 template<
class Operator,
int Length>
50 public CheckingPolicy<length>
60 enum {Length = length};
65 template<
template<
int>
class CheckingPolicy2>
69 template<
class Operator>
75 Array(
const T&,
const T&);
77 Array(
const T&,
const T&,
const T&);
79 Array(
const T&,
const T&,
const T&,
const T&);
81 Array(
const T&,
const T&,
const T&,
const T&,
const T&);
83 Array(
const T&,
const T&,
const T&,
const T&,
const T&,
86 Array(
const T&,
const T&,
const T&,
const T&,
const T&,
89 Array(
const T&,
const T&,
const T&,
const T&,
const T&,
90 const T&,
const T&,
const T&);
92 Array(
const T&,
const T&,
const T&,
const T&,
const T&,
93 const T&,
const T&,
const T&,
const T&);
95 Array(
const T&,
const T&,
const T&,
const T&,
const T&,
96 const T&,
const T&,
const T&,
const T&,
const T&);
117 template<
class T2,
template <
int>
class CheckingPolicy2>
121 template<
class Operator>
130 template<
class T2,
template <
int>
class CheckingPolicy2>
139 template<
class T2,
template <
int>
class CheckingPolicy2>
148 template<
class T2,
template <
int>
class CheckingPolicy2>
157 template<
class T2,
template <
int>
class CheckingPolicy2>
166 template<
typename T2>
175 template<
typename T2>
184 template<
typename T2>
193 template<
typename T2>
198 template<
class Operator>
202 template<
class Operator>
206 template<
class Operator>
210 template<
class Operator>
220 template<
int destLength>
223 Array<T,length-1,CheckingPolicy> projectDim(
int dim)
const;
253 template<
int>
class CheckingPolicy1,
template<
int>
class CheckingPolicy2
263 template<
int>
class CheckingPolicy1,
template<
int>
class CheckingPolicy2
273 template<
int>
class CheckingPolicy1,
template<
int>
class CheckingPolicy2
283 template<
int>
class CheckingPolicy1,
template<
int>
class CheckingPolicy2
293 #endif // SCHNEK_ARRAY_HPP_ Array< T, length, CheckingPolicy > & operator-=(const Array< T2, length, CheckingPolicy2 > &)
Array< T, destLength, CheckingPolicy > project() const
projects the Array onto an Array of shorter length
Array< T, length, CheckingPolicy > & clear()
Sets all fields to zero.
static Array< T, length, CheckingPolicy > Ones()
Array()
The default constructor.
Array< T, length, CheckingPolicy > & operator*=(const Array< T2, length, CheckingPolicy2 > &)
static Array< T, length, CheckingPolicy > Zero()
Array< T, length, CheckingPolicy > & fill(const T &)
Fills all fields with a given value.
T sum() const
Returns the sum of all elements.
T & at(int)
Accessor operator.
Definition: arraycheck.hpp:38
Array< T, length, CheckingPolicy > & operator+=(const Array< T2, length, CheckingPolicy2 > &)
Array< T, length, CheckingPolicy > & operator=(const Array< T2, length, CheckingPolicy2 > &)
T sqr() const
Returns the sum of squares of all elements.
T product() const
Returns the product of all elements.
T & operator[](int)
Accessor operator.
Array< T, length, CheckingPolicy > & operator/=(const Array< T2, length, CheckingPolicy2 > &)