|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectquentinc.geom.Matrix
public class Matrix
Class for manipulating matrix of arbitrary size
| Constructor Summary | |
|---|---|
Matrix(double[][] d)
Create a new matrix with the 2D array given. |
|
Matrix(int w,
int h)
Create a new matrix with given number of rows and columns |
|
Matrix(Vector v)
Create a new 3x1 matrix representing the given vector. |
|
| Method Summary | |
|---|---|
Matrix |
add(Matrix m)
Add the given matrix to this one. |
Matrix |
clone()
|
Matrix |
divide(double d)
Divide this matrix by a scalar value |
boolean |
equals(java.lang.Object o)
|
double |
get(int row,
int col)
Get the value at the given position |
int |
getColumnCount()
Get the number of columns |
int |
getRowCount()
Get the number of rows |
int |
hashCode()
|
Matrix |
multiply(double d)
Multiply this matrix by a scalar value |
Matrix |
multiply(Matrix m)
Multiply this matrix with the one given. |
void |
set(int row,
int col,
double value)
Set the value at the given position |
Matrix |
subtract(Matrix m)
Subtract the given matrix to this one |
java.lang.String |
toString()
Return a string representation of this matrix. |
Vector |
toVector()
Convert this matrix to a vector, using the first column as coefficiants. |
Matrix |
transpose()
Create a new matrix which is the transposition of this one. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Matrix(int w,
int h)
public Matrix(double[][] d)
public Matrix(Vector v)
| Method Detail |
|---|
public double get(int row,
int col)
public void set(int row,
int col,
double value)
public int getColumnCount()
public int getRowCount()
public Vector toVector()
public 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.Objectpublic Matrix add(Matrix m)
public Matrix subtract(Matrix m)
public Matrix multiply(double d)
public Matrix divide(double d)
public Matrix clone()
clone in class java.lang.Objectpublic Matrix transpose()
public Matrix multiply(Matrix m)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||