AnimaL |
Tutorial |
Documentation |
#include <array.h>
Inheritance diagram for animal::Array< N, T >:
Two template parameters are given: the type of the entries and the size (dimension) of the array. Knowing the size of the array at compile-time allows the compiler to perfrom optimizations.
Additionally, this class provides an stl-compatible interface (.size(), .begin(), ::value_type, etc.) due to its parent class boost::array.
Ad-hoc constructors can be used for dimensions 2,3,4: Array(const T&,const T&), Array(const T&,const T&,const T&), Array(const T&,const T&,const T&,const T&),
array_test.cpp, linear_test.cpp, matrix_test.cpp, and rotation2d_test.cpp.
Definition at line 26 of file array.h.
Public Member Functions | |
Array () | |
default constructor, does nothing | |
Array (const T &t) | |
set all the values uniformly to the given value | |
Array (const T t[N]) | |
copy the values from the C array. | |
Array (const T &x, const T &y) | |
Constructor for a 2d vector. | |
Array (const T &x, const T &y, const T &z) | |
Constructor for a 3d vector. | |
Array (const T &x, const T &y, const T &z, const T &t) | |
Constructor for a 4d vector. | |
Array & | operator+= (const Array &v) |
![]() | |
Array & | operator-= (const Array &v) |
![]() | |
Array & | operator *= (const T &a) |
![]() | |
Array | operator+ (const Array &v) const |
![]() | |
Array | operator- (const Array &v) const |
![]() | |
Array | operator * (const T &a) const |
![]() | |
T | operator * (const Array &v) const |
![]() | |
Array | operator- () const |
![]() | |
Friends | |
Array | operator * (const float a, const Array &u) |
![]() |
|
default constructor, does nothing
|
|
set all the values uniformly to the given value
|
|
copy the values from the C array.
|
|
Constructor for a 2d vector.
|
|
Constructor for a 3d vector.
|
|
Constructor for a 4d vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|