commons-statistics-regression/src/main/java/org/apache/commons/statistics/regression/util/matrix/StatisticsMatrix.java
/**
     * Creates an identity matrix given it's square width.
     *
     * @param width size of square matrix; numCols and numRows
     * @return the width sized identity matrix
     */
Creates an identity matrix given it's square width.
@param width size of square matrix; numCols and numRows
@return the width sized identity matrix
Creates an identity matrix given it ' s square width . @param width size of square matrix ; numCols and numRows @return the width sized identity matrix
@SuppressWarnings("unchecked")
    public static StatisticsMatrix identity(int width) {
        StatisticsMatrix ret = new StatisticsMatrix(width, width);
        ret.ops.setIdentity(ret.mat);
        return ret;
    }
@ SuppressWarnings ( "unchecked" ) public static StatisticsMatrix identity ( int width ) { StatisticsMatrix ret = new StatisticsMatrix ( width , width ) ; ret . ops . setIdentity ( ret . mat ) ; return ret ; }
Creates an identity matrix given it's square width.
Creates an identity matrix given it ' s square width .