|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmatrices.dbl.transformer.MatrixTransformer
MatrixTransformer is responsible for classical non element-by-element transformation of a matrix
Captures classical transformations that aren't applicable in an element-by-element way (only exception isnegate(org.jmatrices.dbl.Matrix)
)
We might decide to remove this restriction and provide some important ebe transformations here
or we might move them(to be methods) and negate to MatrixEBETransformer
MatrixEBETransformation
,
MatrixEBETransformer
Method Summary | |
static Matrix |
cumulativeColumnProduct(Matrix m)
x = 1 -3 2 2 3 -1 y = cumulativeColumnProduct(x); 1 -3 2 -6 6 6 |
static Matrix |
cumulativeColumnSum(Matrix m)
x = 1 -3 2 2 3 -1 y = cumulativeColumnSum(x); 1 -3 3 -1 6 -2 |
static Matrix |
diagonal(Matrix m)
Column vector contatining the diagonal elements of the matrix x= 1 0 0 0 1 0 0 0 1 then y = diagonal(x) is 1 1 1 |
static Matrix |
embedDiagonal(Matrix m,
int offset)
Returns a matrix with diagonal (indicated by offset) composed of the elements from the passed row or column vector m |
static Matrix |
extractDiagonal(Matrix m,
int offset)
Gets the elements of the indicated diagonal (offset) as a column vector |
static Matrix |
extractLowerTriangular(Matrix m,
int offset)
Extracts the lower triangular matrix given an offset that indicates the relative diagonal |
static Matrix |
extractUpperTriangular(Matrix m,
int offset)
Extracts the upper triangular matrix given an offset that indicates the relative diagonal |
static Matrix |
inverse(Matrix m)
Inverts the matrix |
static Matrix |
negate(Matrix m)
Transforms the matrix by negating all the elements |
static Matrix |
pow(Matrix m,
int n)
Multiplies the square matrix with itself multiple times. |
static Matrix |
secondaryDiagonal(Matrix m)
//secondary diagonal - the diagonal of a square matrix running from the lower left entry to the upper right entry to implement it use .... 1. first element is 0 and col 2. second element is (0+1)or1 and col-1 3. third element is (1+1)or2 and col-2 4. and so on till rows() and 0 is reached .. |
static Matrix |
transpose(Matrix m)
Transforms the matrix into it's transpose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Matrix negate(Matrix m)
m
- Matrix
public static Matrix transpose(Matrix m)
m
-
public static Matrix inverse(Matrix m)
m
- Matrix
public static Matrix diagonal(Matrix m)
x= 1 0 0 0 1 0 0 0 1 then y = diagonal(x) is 1 1 1
m
-
public static Matrix embedDiagonal(Matrix m, int offset)
m
m
- a column or row Vectoroffset
- the diagonal to be embeded (=0 will embed the elements as the main diagonal)
public static Matrix extractDiagonal(Matrix m, int offset)
m
- offset
- the diagonal to be extracted (=0 will extract the main diagonal)
public static Matrix extractUpperTriangular(Matrix m, int offset)
m
- offset
-
public static Matrix extractLowerTriangular(Matrix m, int offset)
m
- offset
-
public static Matrix pow(Matrix m, int n)
m
- is a square matrixn
- if n>1 performs the operation else if (n<=0) returns a matrix composed of ones.
public static Matrix secondaryDiagonal(Matrix m)
to implement it use .... 1. first element is 0 and col 2. second element is (0+1)or1 and col-1 3. third element is (1+1)or2 and col-2 4. and so on till rows() and 0 is reached ..
m
-
public static Matrix cumulativeColumnProduct(Matrix m)
x = 1 -3 2 2 3 -1 y = cumulativeColumnProduct(x); 1 -3 2 -6 6 6
m
-
public static Matrix cumulativeColumnSum(Matrix m)
x = 1 -3 2 2 3 -1 y = cumulativeColumnSum(x); 1 -3 3 -1 6 -2
m
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |