Matrix::Determinant Method

double Determinant(TMtxType MtxType = TMtxType::mtGeneral) const;

Determinant of squared matrix.

#NameTypeDescription
1MtxType = TMtxType::mtGeneralTMtxType
Remarks:

Calculate the determinant of squared real matrix. An exception is raised if the calling matrix Matrix::Complex property is true.

Examples
#include "MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix A;
    double b;

    A.SetIt(2, 2, false, DewArray<double>{1, 2, 2, 4}); // 2x2, not complex matrix
    b = A.Determinant(); // 4 + 4 = 8
}
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler