Java Code Examples for org.apache.commons.math3.linear.RealMatrix#getTrace()
The following examples show how to use
org.apache.commons.math3.linear.RealMatrix#getTrace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonsMatrixAlgebra.java From Strata with Apache License 2.0 | 5 votes |
@Override public double getTrace(Matrix m) { ArgChecker.notNull(m, "m"); if (m instanceof DoubleMatrix) { RealMatrix temp = CommonsMathWrapper.wrap((DoubleMatrix) m); return temp.getTrace(); } throw new IllegalArgumentException("Can only find trace of DoubleMatrix; have " + m.getClass()); }
Example 2
Source File: GamaFloatMatrix.java From gama with GNU General Public License v3.0 | 4 votes |
@Override public Double getTrace(final IScope scope) throws GamaRuntimeException { final RealMatrix rm = toApacheMatrix(scope); return rm.getTrace(); }
Example 3
Source File: GamaIntMatrix.java From gama with GNU General Public License v3.0 | 4 votes |
@Override public Double getTrace(final IScope scope) throws GamaRuntimeException { final RealMatrix rm = toApacheMatrix(scope); return rm.getTrace(); }