|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tagtraum.perf.datastructures.MatrixOperations
Operations for two dimensional int
arrays.
Constructor Summary | |
MatrixOperations()
|
Method Summary | |
static int[][] |
add(int[][] a,
int[][] b)
Adds two int matrices. |
static int[][] |
add(int[][] a,
int[][] b,
int[][] c,
int ax,
int ay,
int bx,
int by,
int cx,
int cy,
int rows,
int columns)
Adds two int sub-matrices. |
static int[][] |
multiply(int[][] a,
int[][] b)
Multiplies two int matrices. |
static int[][] |
multithreadedMultiply(int[][] a,
int[][] b,
int threads)
Multiplies two int matrices. |
static int[][] |
subtract(int[][] a,
int[][] b)
Substracts two int matrices. |
static int[][] |
subtract(int[][] a,
int[][] b,
int[][] c,
int ax,
int ay,
int bx,
int by,
int cx,
int cy,
int rows,
int columns)
Substracts two int sub-matrices. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MatrixOperations()
Method Detail |
public static int[][] add(int[][] a, int[][] b)
a
- matrix ab
- matrix b
public static int[][] add(int[][] a, int[][] b, int[][] c, int ax, int ay, int bx, int by, int cx, int cy, int rows, int columns)
a
- matrix ab
- matrix bc
- resulting matrixax
- starting row of the sub matrix in a that shall be used for the additionay
- starting column of the sub matrix in a that shall be used for the additionbx
- starting row of the sub matrix in b that shall be used for the additionby
- starting column of the sub matrix in b that shall be used for the additioncx
- starting row of the sub matrix in c where the result shall be placedcy
- starting column of the sub matrix in a where the result shall be placedrows
- rows to addcolumns
- columns to add
add(int[][], int[][])
public static int[][] subtract(int[][] a, int[][] b)
a
- matrix ab
- matrix b
public static int[][] subtract(int[][] a, int[][] b, int[][] c, int ax, int ay, int bx, int by, int cx, int cy, int rows, int columns)
a
- matrix ab
- matrix bc
- resulting matrixax
- starting row of the sub matrix in a that shall be used for the substractionay
- starting column of the sub matrix in a that shall be used for the substractionbx
- starting row of the sub matrix in b that shall be used for the substractionby
- starting column of the sub matrix in b that shall be used for the substractioncx
- starting row of the sub matrix in c where the result shall be placedcy
- starting column of the sub matrix in a where the result shall be placedrows
- rows to substractcolumns
- columns to substract
add(int[][], int[][])
public static int[][] multiply(int[][] a, int[][] b)
a
- matrix ab
- matrix b
public static int[][] multithreadedMultiply(int[][] a, int[][] b, int threads)
a
- matrix ab
- matrix bthreads
- the number of threads to start. If threads is <=1 no separate thread
is started
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |