|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.rmi.Matrix
public class Matrix
Represents a matrix of doubles. Contains methods to create special matrices for this assignment. It also contains general methods to multiply matrices.
| Constructor Summary | |
|---|---|
Matrix()
|
|
| Method Summary | |
|---|---|
static int |
countColumns(double[][] m)
Returns the number of columns in a matrix |
static int |
countRows(double[][] m)
Returns the number of rows in a matrix |
static double[][] |
multiply(double[][] a,
double[][] b)
Multiplies two matrices and returns their product. |
static void |
print(String name,
double[][] m,
PrintWriter out)
Prints this a matrix |
static void |
print(String name,
double[] v,
PrintWriter out)
Prints a vector in column form |
static void |
setPrecision(int n)
Sets the number of decimal places to be displayed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Matrix()
| Method Detail |
|---|
public static void setPrecision(int n)
public static int countRows(double[][] m)
public static int countColumns(double[][] m)
IllegalArgumentException - The columns are not length-consistent
public static double[][] multiply(double[][] a,
double[][] b)
public static void print(String name,
double[][] m,
PrintWriter out)
public static void print(String name,
double[] v,
PrintWriter out)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||