use of org.apache.ignite.ml.math.exceptions.CardinalityException in project ignite by apache.
the class AbstractMatrix method inverse.
/** {@inheritDoc} */
@Override
public Matrix inverse() {
if (rowSize() != columnSize())
throw new CardinalityException(rowSize(), columnSize());
//TODO: This decomposition should be cached
LUDecomposition dec = new LUDecomposition(this);
Matrix res = dec.solve(likeIdentity());
dec.destroy();
return res;
}
Aggregations