determinant property

Complex get determinant

Implementation

Complex get determinant {
  _checkSquare();
  if (_determinant != null) return _determinant!;
  if (_NUMROWS == 1) {
    _determinant = getAt(0, 0);
    return _determinant!;
  }
  Complex d = Complex.ZERO;
  Complex fact = Complex.ONE;
  for (int i = 0; i < _NUMROWS; i++) {
    d += fact * this.getAt(i, 0) * this.getSubMatrix(i, 0).determinant;
    fact = fact.stretch(-1); // *= -1;
  }
  this._determinant = d;
  return _determinant!;
}