9 #ifndef SQUARE_MATRIX_H
10 #define SQUARE_MATRIX_H
12 #include <argos3/core/utility/math/matrix/matrix.h>
26 for(
UInt32 i = 0; i < DIM; i++) {
27 for(
UInt32 j = 0; j < DIM; j++) {
39 bool bIsIdentMat =
true;
40 for(
UInt32 i = 0; i < DIM; i++) {
41 for(
UInt32 j = 0; j < DIM; j++) {
65 for(
UInt32 unColTempA = 0; unColTempA < DIM; unColTempA++) {
66 for(
UInt32 unRow = 1; unRow < DIM; unRow++) {
68 for (
UInt32 unCol = 0; unCol < DIM; unCol++) {
69 if (unCol == unColTempA)
86 for(
UInt32 unCofactorCol = 0; unCofactorCol < DIM; unCofactorCol++) {
87 for(
UInt32 unCofactorRow = 0; unCofactorRow < DIM; unCofactorRow++) {
90 for(
UInt32 unRow = 0; unRow < DIM; unRow++) {
91 if(unRow != unCofactorRow) {
93 for(
UInt32 unCol = 0; unCol < DIM; unCol++) {
94 if(unCol != unCofactorCol) {
103 cCofactorMatrix(unCofactorRow, unCofactorCol) =
104 std::pow(-1.0, unCofactorRow + unCofactorCol + 2u) * cTempMatrix.
GetDeterminant();
107 return cCofactorMatrix;
112 for(
UInt32 i = 0; i < DIM; i++) {
113 for(
UInt32 j = 0; j < DIM; j++) {
117 return cTransposedMatrix;
123 return cInverseMatrix;
unsigned int UInt32
32-bit unsigned integer.
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
CSquareMatrix(const CMatrix< DIM, DIM > &c_other)
CSquareMatrix< DIM > GetInverse() const
CSquareMatrix< DIM > GetCofactorMatrix() const
Find the cofactor matrix.
CSquareMatrix< DIM > GetTransposed() const
Real GetDeterminant() const