24 #include <Eigen/Dense>
38 typedef Eigen::Matrix<T, Eigen::Dynamic, 1>
VecData;
39 typedef Eigen::Array<T, Eigen::Dynamic, 1>
ArrayData;
74 inline const Eigen::Map<VecData>
eigen_map()
const {
88 inline const Eigen::Map<ArrayData>
array_map()
const {
122 Eigen::Map<ArrayData> result_map = res.
array_map();
130 Eigen::Map<ArrayData> result_map = res.
array_map();
131 result_map = this->
array_map().inverse();
138 Eigen::Map<ArrayData> result_map = res.
array_map();
161 Eigen::Map<VecData> result_map = res.
eigen_map();
171 Eigen::Map<ArrayData> result_map = res.
array_map();
179 Eigen::Map<ArrayData> result_map = res.
array_map();
189 Eigen::Map<ArrayData> result_map = res.
array_map();
197 Eigen::Map<ArrayData> result_map = res.
array_map();
207 Eigen::Map<ArrayData> result_map = res.
array_map();
248 Eigen::Map<typename ArenaVec<T>::VecData> result_map = res.
eigen_map();
257 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> MatData;
261 Eigen::Map<MatData> result_map = Eigen::Map<MatData>(res.
data_ptr(), this->data_size_, other.
data_size());
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
Outer product - only proposal of multi operator.
ArenaOVec< T > operator+(const ArenaOVec< T > &other) const
ArenaOVec(ArenaVec< T > &vec)
ArenaOVec< T > operator*(const ArenaOVec< T > &other) const
ArenaVec< T > & vec_
Reference to ArenaVec.
T * allocate_simd(size_t n_items)
Allocate and return data pointer of n_item array of type T (alignment to length given by simd_alignme...
Eigen::Array< T, Eigen::Dynamic, 1 > ArrayData
ArenaVec()
Default constructor, set invalid data pointer.
Eigen::Matrix< T, Eigen::Dynamic, 1 > VecData
Type definition.
ArenaVec< T > operator/(const ArenaVec< T > &other) const
ArenaVec(size_t data_size, AssemblyArena &arena)
const T * data_ptr() const
Smae as previous but return const pointer.
T * data_ptr()
Return data pointer (development method)
const T & operator()(std::size_t item) const
For development only. TODO remove.
const Eigen::Map< ArrayData > array_map() const
Smae as previous but with const modifier.
ArenaVec< T > sqrt() const
ArenaVec< T > operator*(T multi) const
ArenaVec< T > operator*(const ArenaVec< T > &other) const
Eigen::Map< VecData > eigen_map()
ArenaVec< T > abs() const
AssemblyArena & arena()
Getter for arena_.
Eigen::Map< ArrayData > array_map()
size_t data_size_
Length of data array.
AssemblyArena * arena_
Pointer to Arena where intermediate calculations and results are stored, should be changed by set_pat...
const Eigen::Map< VecData > eigen_map() const
Smae as previous but with const modifier.
ArenaVec< T > operator/(T div_by) const
ArenaVec< T > inverse() const
ArenaVec(T *data_ptr, size_t data_size, AssemblyArena &arena)
Constructor. Allows create ArenaVec from ArenaOVec.
void set_patch_arena(PatchArena &arena)
Set pointer to PatchArena.
ArenaVec< T > operator-(const ArenaVec< T > &other) const
T & operator()(std::size_t item)
For development only. TODO remove.
ArenaVec< T > operator+(const ArenaVec< T > &other) const
ArenaVec(const ArenaVec< T > &other)
Copy constructor.
size_t data_size() const
Getter for data_size_.
T scalar_val_
Scalar value of T type.
T * data_ptr_
Pointer to data array.