public class Matrix
extends java.lang.Object
| Constructor and Description |
|---|
Matrix(int rows,
int columns)
Constructs an empty matrix with the given number of row and columns
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
get(int row)
Returns contents of a row of the matrix
|
double |
get(int row,
int column)
Returns the value of a particular cell of the matrix
|
void |
printMatrix()
Prints the matrix
|
void |
set(int row,
int column,
double value)
Sets value of a particular cell of the matrix
|
double[][] |
values() |
public Matrix(int rows,
int columns)
rows - Number of rowscolumns - Number of columnspublic void set(int row,
int column,
double value)
row - Row numbercolumn - Column numbervalue - Value to setpublic double get(int row,
int column)
row - Row numbercolumn - Column numberrow][@{code column}]public double[] get(int row)
row - Row numberrowpublic double[][] values()
public void printMatrix()