Заполнить матрицу ЛП, от левого нижнего угла по диагонали: влево - вверх.
Пример 3*3
4 7 9
2 5 8
1 3 6
public interface Matrix
{
/**
* Return the number of rows in the matrix.
* @return the number of rows in the matrix.
*/
public int getNumberOfRows();
/**
* Return the number of columns in the matrix.
* @return the number of columns in the matrix.
*/
public int getNumberOfColumns();
/**
* Return element at position (row,column).
*
* @param row row of element to return.
* @param column column of element to return.
* @return element value of element.
* @throws InvalidMatrixElementException if element position is not within
* matrix.
*/
public double getElement(final int row, final int column)
throws InvalidMatrixElementException;
/**
* Set element at position (row,column). If the element is not within
* the matrix, the matrix is left unchanged.
*
* @param row row of element to set.
* @param column column of element to set.
* @param value value to store at (row,column).
* @throws InvalidMatrixElementException if element position is not within
* matrix.
*/
public void setElement(final int row, final int column, final double value)
throws InvalidMatrixElementException;
/**
* Create a new concrete matrix of size (rows, columns). Must be
* overridden by a subclass that names the actual class used
* to create the matrix.
*
* @param rows number of rows in new matrix. Must be greater than zero.
* @param columns number of columns in new matrix. Must be greater than zero.
* @return the new matrix or null if the size is invalid.
* @throws InvalidMatrixSizeException if size of matrix is not valid
* (row/column lessthan size 1).
*/
public Matrix create(final int rows, final int columns)
throws InvalidMatrixSizeException;
}