Example usage for org.apache.commons.math3.linear Array2DRowRealMatrix getSubMatrix

List of usage examples for org.apache.commons.math3.linear Array2DRowRealMatrix getSubMatrix

Introduction

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

Prototype

public RealMatrix getSubMatrix(final int[] selectedRows, final int[] selectedColumns)
        throws NullArgumentException, NoDataException, OutOfRangeException 

Source Link

Usage

From source file:org.interpss.opf.dc.impl.EqIneqMatrixBuilder.java

private Array2DRowRealMatrix formReducedADWMatrix() {
    Array2DRowRealMatrix angleDiffWeight = formAngleDiffWeightMatrix();
    try {//from ww  w .j av a  2  s.  co m
        int[] selectedRows = this.getNonSwingBusRows();
        return (Array2DRowRealMatrix) angleDiffWeight.getSubMatrix(selectedRows, selectedRows);
    } catch (Exception e) {
        //e.printStackTrace();
        IpssLogger.getLogger().severe(e.toString());
    }
    return null;
}