22 #ifndef fixed_square_matrix_h 23 #define fixed_square_matrix_h 25 #include "fixed_general_matrix.h" 41 static constexpr
bool isVector {
false};
42 typedef AT value_type;
74 template<
class Type,
class Row,
class Col>
85 inline SquareMatrix<Fixed<M>,AT>& operator=(
const SquareMatrix<Fixed<M>,AT> &A) =
default;
93 template <
class Type,
class Row,
class Col>
105 template<
class Type,
class Row,
class Col>
112 constexpr
int size()
const {
return M;}
113 constexpr
int rows()
const {
return M;}
114 constexpr
int cols()
const {
return M;}
116 using Matrix<General,Fixed<M>,Fixed<M>,AT>::operator();
117 using Matrix<General,Fixed<M>,Fixed<M>,AT>::e;
123 explicit inline operator std::vector<std::vector<AT>>()
const;
125 inline const SquareMatrix<Fixed<M>,AT> T()
const;
128 template <
int M,
class AT>
129 inline const SquareMatrix<Fixed<M>,AT> SquareMatrix<Fixed<M>,AT>::T()
const {
130 SquareMatrix<Fixed<M>,AT> A(NONINIT);
131 for(
int i=0; i<M; i++)
132 for(
int j=0; j<M; j++)
137 template <
int M,
class AT>
139 std::vector<std::vector<AT>> ret(size());
140 for(
int r=0; r<size(); r++) {
141 ret[r].resize(size());
142 for(
int c=0; c<size(); c++)
SquareMatrix(const Matrix< Type, Row, Col, AT > &A)
Copy Constructor.
Definition: fixed_square_matrix.h:75
This is the basic matrix class for arbitrary matrices.
Definition: fmatvec.h:41
constexpr int size() const
Size.
Definition: fixed_square_matrix.h:112
SquareMatrix< Fixed< M >, AT > & operator=(const Matrix< Type, Row, Col, AT > &A)
Assignment operator.
Definition: fixed_square_matrix.h:94
Dummy shape class for square matrices.
Definition: types.h:185
SquareMatrix(const SquareMatrix< Row, AT > &A)
Copy Constructor.
Definition: fixed_square_matrix.h:68
Namespace fmatvec.
Definition: _memory.cc:28
Basic shape class for matrices.
Definition: types.h:136