public class Matrix
extends java.lang.Object
| Constructor and Description |
|---|
Matrix(int[][] mat)
every row in mat needs to have the same length.
|
Matrix(int rows,
int columns) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
get(int i,
int j) |
int[] |
getColumn(int j) |
int[] |
getRow(int i) |
int |
hashCode() |
boolean |
logicalAndColumn(int a,
int b)
Compares two column with an logical and
|
boolean |
logicalAndRow(int a,
int b)
Compares two rows with an logical and
|
int |
numOfColums() |
int |
numOfRows() |
void |
removeColumn(int j) |
void |
removeRow(int i) |
void |
set(int i,
int j,
int value) |
java.lang.String |
toString() |
public Matrix(int rows,
int columns)
public Matrix(int[][] mat)
public void set(int i,
int j,
int value)
public int get(int i,
int j)
public int[] getRow(int i)
public int[] getColumn(int j)
public void removeRow(int i)
public void removeColumn(int j)
public int numOfRows()
public int numOfColums()
public boolean logicalAndRow(int a,
int b)
a - indices first rowb - indices second rowpublic boolean logicalAndColumn(int a,
int b)
a - indices first columnb - indices second columnpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object