isNegativeDefiniteMatrix method
Checks if the matrix is a negative definite matrix.
Example:
Matrix L = Matrix([
[-2, 1],
[1, -2]
]);
print(L.isNegativeDefiniteMatrix()); // Output: true
Implementation
bool isNegativeDefiniteMatrix() {
return isSymmetricMatrix() &&
eigenvalues().every((eigenvalue) => eigenvalue < Complex(0));
}