12 template <
class Type, u
int nRows, u
int nCols>
17 typedef typename arma::Mat<Type>::template fixed<nRows,nCols>
ArmaType;
25 for (
uint i = 0; i < nRows * nCols; ++i) {
29 inline const Type *
begin()
const {
35 inline const Type *
end()
const {
36 return begin() + nCols * nRows;
39 return begin() + nCols * nRows;
54 return data[row*nCols+col];
57 return data[row*nCols+col];
59 inline ArmaType
arma()
const {
63 for (
uint i = 0; i < nRows * nCols; ++i) {
69 for (
uint i = 0; i < nRows * nCols; ++i) {
75 const auto * listIt = list.begin();
77 for (
uint i = 0; i < nRows; ++i) {
78 it = (listIt + i)->
begin();
79 for (
uint j = 0; j < nCols; ++j) {
80 data[i*nCols+j] = *(it + j);
86 const Type *
it = list.begin();
87 for (
uint i = 0; i < nRows * nCols; ++i) {
93 const Type * first1 =
begin();
94 const Type * last1 =
end();
95 const Type * first2 = other.begin();
96 for (; first1 != last1; ++first1, ++first2) {
97 if (*first1 != *first2) {
104 const Type * first1 =
begin();
105 const Type * last1 =
end();
106 const Type * first2 = other.
begin();
107 for (; first1 != last1; ++first1, ++first2) {
108 if (*first1 != *first2) {
134 data(size*nRows*nCols, 0)
143 data.resize(size*nRows*nCols);
153 for (
auto i : p)
data.push_back( i );
161 template<u
int nr, u
int nc = 1>
175 template <
class Type, u
int nRows, u
int nCols>
180 template <
class Type, u
int nRows, u
int nCols>
185 template <
class Type, u
int nRows, u
int nCols>
190 template <
class Type, u
int resRows, u
int commonDimension, u
int resCols>
195 template <
class Type, u
int nRows, u
int nCols>
200 template <
class Type, u
int nRows, u
int nCols>
202 return number * a.
arma();
205 template <
class Type, u
int nRows, u
int nCols>
207 return a.
arma() / number;
213 template <u
int N, u
int M>
const Mat< Type, nRows, nCols > & operator=(const Mat< Type, nRows, nCols > &other)
const Mat< Type, nRows, nCols > & operator=(const ArmaType &other)
const Mat< Type, nRows, nCols > & operator=(std::initializer_list< std::initializer_list< Type >> list)
arma::Mat< Type >::template fixed< nRows, nCols > ArmaType
arma::Mat< Type >::template fixed< nRows, nCols > operator+(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
Array(uint size, uint nr, uint nc=1)
arma::Mat< Type >::template fixed< nRows, nCols > operator%(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
Type & operator[](uint index)
arma::Mat< Type >::template fixed< resRows, resCols > operator*(const Mat< Type, resRows, commonDimension > &a, const Mat< Type, commonDimension, resCols > &b)
const Mat< Type, nRows, nCols > & operator=(std::initializer_list< Type > list)
const Type * begin() const
Type & operator()(uint row, uint col)
void push_back(const std::vector< Type > &p)
arma::Mat< Type >::template fixed< nRows, nCols > operator/(const Mat< Type, nRows, nCols > &a, Type number)
bool operator==(const Mat< Type, nRows, nCols > &other)
arma::Mat< Type >::template fixed< nRows, nCols > operator-(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
Mat(const Armor::Mat< Type, nRows, nCols > &other)
const Type & operator()(uint row, uint col) const
Type dot(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
bool operator==(const ArmaType &other)
const Type & operator[](uint index) const