Example usage for org.apache.commons.math3.linear RealMatrix getClass

List of usage examples for org.apache.commons.math3.linear RealMatrix getClass

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear RealMatrix getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.ujmp.commonsmath.CommonsMathDenseDoubleMatrix2DFactory.java

public Matrix dense(RealMatrix matrix) {
    if (matrix == null) {
        throw new RuntimeException("matrix is null");
    } else if (matrix instanceof BlockRealMatrix) {
        return dense((BlockRealMatrix) matrix);
    } else if (matrix instanceof Array2DRowRealMatrix) {
        return dense((Array2DRowRealMatrix) matrix);
    } else {/*w ww  .j av a2 s . c  o m*/
        throw new RuntimeException("implementation not available: " + matrix.getClass());
    }
}