class DiagonalMatrix extends AbstractRealMatrix implements Serializable {

    @Override
    public void setEntry(final int row, final int column, final double value)
        throws OutOfRangeException, NumberIsTooLargeException {
        if (row == column) {
            MatrixUtils.checkRowIndex(this, row);
            data[row] = value;
        } else {
            ensureZero(value);
        }
    }

    public  DiagonalMatrix(final int dimension);
    public  DiagonalMatrix(final double[] d);
    public  DiagonalMatrix(final double[] d, final boolean copyArray);

}