public class CommonOps_ZDRM
extends java.lang.Object
Constructor and Description |
---|
CommonOps_ZDRM() |
Modifier and Type | Method and Description |
---|---|
static void |
add(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b,
org.ejml.data.ZMatrixD1 c)
Performs the following operation:
c = a + b cij = aij + bij |
static org.ejml.data.ZMatrixRMaj[] |
columnsToVector(org.ejml.data.ZMatrixRMaj A,
org.ejml.data.ZMatrixRMaj[] v)
Converts the columns in a matrix into a set of vectors.
|
static void |
conjugate(org.ejml.data.ZMatrixD1 input,
org.ejml.data.ZMatrixD1 output)
Computes the complex conjugate of the input matrix.
reali,j = reali,j imaginaryi,j = -1*imaginaryi,j |
static void |
convert(org.ejml.data.DMatrixD1 input,
org.ejml.data.ZMatrixD1 output)
Converts the real matrix into a complex matrix.
|
static org.ejml.data.Complex_F64 |
det(org.ejml.data.ZMatrixRMaj mat)
Returns the determinant of the matrix.
|
static org.ejml.data.ZMatrixRMaj |
diag(double... data)
Creates a new square matrix whose diagonal elements are specified by data and all
the other elements are zero.
aij = 0 if i ≤ j aij = diag[i] if i = j |
static org.ejml.data.ZMatrixRMaj |
diag(org.ejml.data.ZMatrixRMaj output,
int N,
double... data) |
static void |
elementDivide(double real,
double imaginary,
org.ejml.data.ZMatrixD1 input,
org.ejml.data.ZMatrixD1 output)
Performs element by element division operation with a complex number on the right
outputij = (real + imaginary*i) / inputij |
static void |
elementDivide(org.ejml.data.ZMatrixD1 input,
double real,
double imaginary,
org.ejml.data.ZMatrixD1 output)
Performs element by element division operation with a complex number on the right
outputij = inputij / (real + imaginary*i) |
static double |
elementMaxAbs(org.ejml.data.ZMatrixRMaj a)
Returns the absolute value of the element in the matrix that has the largest absolute value.
Max{ |aij| } for all i and j |
static double |
elementMaxImaginary(org.ejml.data.ZMatrixD1 a)
Returns the value of the imaginary element in the matrix that has the minimum value.
Min{ aij } for all i and j |
static double |
elementMaxMagnitude2(org.ejml.data.ZMatrixD1 a)
Returns the magnitude squared of the complex element with the largest magnitude
Max{ |aij|^2 } for all i and j |
static double |
elementMaxReal(org.ejml.data.ZMatrixD1 a)
Returns the value of the real element in the matrix that has the minimum value.
Min{ aij } for all i and j |
static double |
elementMinImaginary(org.ejml.data.ZMatrixD1 a)
Returns the value of the imaginary element in the matrix that has the minimum value.
Min{ aij } for all i and j |
static double |
elementMinReal(org.ejml.data.ZMatrixD1 a)
Returns the value of the real element in the matrix that has the minimum value.
Min{ aij } for all i and j |
static void |
elementMultiply(org.ejml.data.ZMatrixD1 input,
double real,
double imaginary,
org.ejml.data.ZMatrixD1 output)
Performs element by element multiplication operation with a complex numbert
outputij = inputij * (real + imaginary*i) |
static org.ejml.data.ZMatrixRMaj |
extract(org.ejml.data.ZMatrixRMaj src,
int srcY0,
int srcY1,
int srcX0,
int srcX1)
Creates a new matrix which is the specified submatrix of 'src'
|
static void |
extract(org.ejml.data.ZMatrixRMaj src,
int srcY0,
int srcY1,
int srcX0,
int srcX1,
org.ejml.data.ZMatrixRMaj dst,
int dstY0,
int dstX0)
Extracts a submatrix from 'src' and inserts it in a submatrix in 'dst'.
|
static void |
extractDiag(org.ejml.data.ZMatrixRMaj src,
org.ejml.data.ZMatrixRMaj dst)
Extracts the diagonal elements 'src' write it to the 'dst' vector.
|
static void |
fill(org.ejml.data.ZMatrixD1 a,
double real,
double imaginary)
Sets every element in the matrix to the specified value.
aij = value |
static org.ejml.data.ZMatrixRMaj |
identity(int width)
Creates an identity matrix of the specified size.
aij = 0+0i if i ≠ j aij = 1+0i if i = j |
static org.ejml.data.ZMatrixRMaj |
identity(int width,
int height)
Creates a matrix with diagonal elements set to 1 and the rest 0.
aij = 0+0i if i ≠ j aij = 1+0i if i = j |
static boolean |
invert(org.ejml.data.ZMatrixRMaj A)
Performs a matrix inversion operation on the specified matrix and stores the results
in the same matrix.
a = a-1 |
static boolean |
invert(org.ejml.data.ZMatrixRMaj input,
org.ejml.data.ZMatrixRMaj output)
Performs a matrix inversion operation that does not modify the original
and stores the results in another matrix.
|
static void |
magnitude(org.ejml.data.ZMatrixD1 input,
org.ejml.data.DMatrixD1 output)
Computes the magnitude of the complex number in the input matrix and stores the results in the output
matrix.
|
static void |
mult(double realAlpha,
double imgAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * a * b cij = α ∑k=1:n { * aik * bkj} |
static void |
mult(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = a * b cij = ∑k=1:n { * aik * bkj} |
static void |
multAdd(double realAlpha,
double imgAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * a * b cij = cij + α * ∑k=1:n { aik * bkj} |
static void |
multAdd(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + a * b cij = cij + ∑k=1:n { aik * bkj} |
static void |
multAddTransA(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * aH * b cij =cij + α * ∑k=1:n { aki * bkj} |
static void |
multAddTransA(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + aH * b cij = cij + ∑k=1:n { aki * bkj} |
static void |
multAddTransAB(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * aH * bH cij = cij + α * ∑k=1:n { aki * bjk} |
static void |
multAddTransAB(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + aH * bH cij = cij + ∑k=1:n { aki * bjk} |
static void |
multAddTransB(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * a * bH cij = cij + α * ∑k=1:n { aik * bjk} |
static void |
multAddTransB(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + a * bH cij = cij + ∑k=1:n { aik * bjk} |
static void |
multTransA(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * aH * b cij = α ∑k=1:n { aki * bkj} |
static void |
multTransA(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = aH * b cij = ∑k=1:n { aki * bkj} |
static void |
multTransAB(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * aH * bH cij = α ∑k=1:n { aki * bjk} |
static void |
multTransAB(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = aT * bT cij = ∑k=1:n { aki * bjk} |
static void |
multTransB(double realAlpha,
double imagAlpha,
org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * a * bH cij = α ∑k=1:n { aik * bjk} |
static void |
multTransB(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = a * bH cij = ∑k=1:n { aik * bjk} |
static void |
scale(double alphaReal,
double alphaImag,
org.ejml.data.ZMatrixD1 a)
Performs an in-place element by element scalar multiplication.
aij = α*aij |
static void |
setIdentity(org.ejml.data.ZMatrixRMaj mat)
Sets all the diagonal elements equal to one and everything else equal to zero.
|
static boolean |
solve(org.ejml.data.ZMatrixRMaj a,
org.ejml.data.ZMatrixRMaj b,
org.ejml.data.ZMatrixRMaj x)
Solves for x in the following equation:
A*x = b |
static org.ejml.data.DMatrixRMaj |
stripImaginary(org.ejml.data.ZMatrixD1 input,
org.ejml.data.DMatrixRMaj output)
Places the imaginary component of the input matrix into the output matrix.
|
static org.ejml.data.DMatrixRMaj |
stripReal(org.ejml.data.ZMatrixD1 input,
org.ejml.data.DMatrixRMaj output)
Places the real component of the input matrix into the output matrix.
|
static void |
subtract(org.ejml.data.ZMatrixD1 a,
org.ejml.data.ZMatrixD1 b,
org.ejml.data.ZMatrixD1 c)
Performs the following operation:
c = a - b cij = aij - bij |
static void |
transpose(org.ejml.data.ZMatrixRMaj mat)
Performs an "in-place" transpose.
|
static org.ejml.data.ZMatrixRMaj |
transpose(org.ejml.data.ZMatrixRMaj input,
org.ejml.data.ZMatrixRMaj output)
Transposes input matrix 'a' and stores the results in output matrix 'b':
bij = aji where 'b' is the transpose of 'a'. |
static void |
transposeConjugate(org.ejml.data.ZMatrixRMaj mat)
Performs an "in-place" conjugate transpose.
|
static org.ejml.data.ZMatrixRMaj |
transposeConjugate(org.ejml.data.ZMatrixRMaj input,
org.ejml.data.ZMatrixRMaj output)
Conjugate transposes input matrix 'a' and stores the results in output matrix 'b':
b-reali,j = a-realj,i b-imaginaryi,j = -1*a-imaginaryj,i where 'b' is the transpose of 'a'. |
public static org.ejml.data.ZMatrixRMaj identity(int width)
Creates an identity matrix of the specified size.
aij = 0+0i if i ≠ j
aij = 1+0i if i = j
width
- The width and height of the identity matrix.public static org.ejml.data.ZMatrixRMaj identity(int width, int height)
Creates a matrix with diagonal elements set to 1 and the rest 0.
aij = 0+0i if i ≠ j
aij = 1+0i if i = j
width
- The width of the identity matrix.height
- The height of the identity matrix.public static org.ejml.data.ZMatrixRMaj diag(double... data)
Creates a new square matrix whose diagonal elements are specified by data and all
the other elements are zero.
aij = 0 if i ≤ j
aij = diag[i] if i = j
data
- Contains the values of the diagonal elements of the resulting matrix.public static org.ejml.data.ZMatrixRMaj diag(org.ejml.data.ZMatrixRMaj output, int N, double... data)
public static void extractDiag(org.ejml.data.ZMatrixRMaj src, org.ejml.data.ZMatrixRMaj dst)
Extracts the diagonal elements 'src' write it to the 'dst' vector. 'dst' can either be a row or column vector.
src
- Matrix whose diagonal elements are being extracted. Not modified.dst
- A vector the results will be written into. Modified.public static void convert(org.ejml.data.DMatrixD1 input, org.ejml.data.ZMatrixD1 output)
input
- Real matrix. Not modified.output
- Complex matrix. Modified.public static org.ejml.data.DMatrixRMaj stripReal(org.ejml.data.ZMatrixD1 input, org.ejml.data.DMatrixRMaj output)
input
- Complex matrix. Not modified.output
- real matrix. Modified.public static org.ejml.data.DMatrixRMaj stripImaginary(org.ejml.data.ZMatrixD1 input, org.ejml.data.DMatrixRMaj output)
input
- Complex matrix. Not modified.output
- real matrix. Modified.public static void magnitude(org.ejml.data.ZMatrixD1 input, org.ejml.data.DMatrixD1 output)
Computes the magnitude of the complex number in the input matrix and stores the results in the output matrix.
magnitude = sqrt(real^2 + imaginary^2)input
- Complex matrix. Not modified.output
- real matrix. Modified.public static void conjugate(org.ejml.data.ZMatrixD1 input, org.ejml.data.ZMatrixD1 output)
Computes the complex conjugate of the input matrix.
reali,j = reali,j
imaginaryi,j = -1*imaginaryi,j
input
- Input matrix. Not modified.output
- The complex conjugate of the input matrix. Modified.public static void fill(org.ejml.data.ZMatrixD1 a, double real, double imaginary)
Sets every element in the matrix to the specified value.
aij = value
a
- A matrix whose elements are about to be set. Modified.real
- The real componentimaginary
- The imaginary componentpublic static void add(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b, org.ejml.data.ZMatrixD1 c)
Performs the following operation:
c = a + b
cij = aij + bij
Matrix C can be the same instance as Matrix A and/or B.
a
- A Matrix. Not modified.b
- A Matrix. Not modified.c
- A Matrix where the results are stored. Modified.public static void subtract(org.ejml.data.ZMatrixD1 a, org.ejml.data.ZMatrixD1 b, org.ejml.data.ZMatrixD1 c)
Performs the following operation:
c = a - b
cij = aij - bij
Matrix C can be the same instance as Matrix A and/or B.
a
- A Matrix. Not modified.b
- A Matrix. Not modified.c
- A Matrix where the results are stored. Modified.public static void scale(double alphaReal, double alphaImag, org.ejml.data.ZMatrixD1 a)
Performs an in-place element by element scalar multiplication.
aij = α*aij
a
- The matrix that is to be scaled. Modified.alphaReal
- real component of scale factoralphaImag
- imaginary component of scale factorpublic static void mult(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = a * b
cij = ∑k=1:n { * aik * bkj}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void mult(double realAlpha, double imgAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * a * b
cij = α ∑k=1:n { * aik * bkj}
realAlpha
- real component of scaling factor.imgAlpha
- imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAdd(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + a * b
cij = cij + ∑k=1:n { aik * bkj}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAdd(double realAlpha, double imgAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * a * b
cij = cij + α * ∑k=1:n { aik * bkj}
realAlpha
- real component of scaling factor.imgAlpha
- imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransA(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = aH * b
cij = ∑k=1:n { aki * bkj}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransA(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * aH * b
cij = α ∑k=1:n { aki * bkj}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransB(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = a * bH
cij = ∑k=1:n { aik * bjk}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransB(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * a * bH
cij = α ∑k=1:n { aik * bjk}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransAB(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = aT * bT
cij = ∑k=1:n { aki * bjk}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multTransAB(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = α * aH * bH
cij = α ∑k=1:n { aki * bjk}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransA(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + aH * b
cij = cij + ∑k=1:n { aki * bkj}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransA(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * aH * b
cij =cij + α * ∑k=1:n { aki * bkj}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransB(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + a * bH
cij = cij + ∑k=1:n { aik * bjk}
a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransB(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * a * bH
cij = cij + α * ∑k=1:n { aik * bjk}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not modified.b
- The right matrix in the multiplication operation. Not modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransAB(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + aH * bH
cij = cij + ∑k=1:n { aki * bjk}
a
- The left matrix in the multiplication operation. Not Modified.b
- The right matrix in the multiplication operation. Not Modified.c
- Where the results of the operation are stored. Modified.public static void multAddTransAB(double realAlpha, double imagAlpha, org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj c)
Performs the following operation:
c = c + α * aH * bH
cij = cij + α * ∑k=1:n { aki * bjk}
realAlpha
- Real component of scaling factor.imagAlpha
- Imaginary component of scaling factor.a
- The left matrix in the multiplication operation. Not Modified.b
- The right matrix in the multiplication operation. Not Modified.c
- Where the results of the operation are stored. Modified.public static void transpose(org.ejml.data.ZMatrixRMaj mat)
Performs an "in-place" transpose.
For square matrices the transpose is truly in-place and does not require
additional memory. For non-square matrices, internally a temporary matrix is declared and
transpose(ZMatrixRMaj, ZMatrixRMaj)
is invoked.
mat
- The matrix that is to be transposed. Modified.public static void transposeConjugate(org.ejml.data.ZMatrixRMaj mat)
Performs an "in-place" conjugate transpose.
mat
- The matrix that is to be transposed. Modified.transpose(ZMatrixRMaj)
public static org.ejml.data.ZMatrixRMaj transpose(org.ejml.data.ZMatrixRMaj input, org.ejml.data.ZMatrixRMaj output)
Transposes input matrix 'a' and stores the results in output matrix 'b':
bij = aji
where 'b' is the transpose of 'a'.
input
- The original matrix. Not modified.output
- Where the transpose is stored. If null a new matrix is created. Modified.public static org.ejml.data.ZMatrixRMaj transposeConjugate(org.ejml.data.ZMatrixRMaj input, org.ejml.data.ZMatrixRMaj output)
Conjugate transposes input matrix 'a' and stores the results in output matrix 'b':
b-reali,j = a-realj,i
b-imaginaryi,j = -1*a-imaginaryj,i
where 'b' is the transpose of 'a'.
input
- The original matrix. Not modified.output
- Where the transpose is stored. If null a new matrix is created. Modified.public static boolean invert(org.ejml.data.ZMatrixRMaj A)
Performs a matrix inversion operation on the specified matrix and stores the results
in the same matrix.
a = a-1
If the algorithm could not invert the matrix then false is returned. If it returns true that just means the algorithm finished. The results could still be bad because the matrix is singular or nearly singular.
A
- The matrix that is to be inverted. Results are stored here. Modified.public static boolean invert(org.ejml.data.ZMatrixRMaj input, org.ejml.data.ZMatrixRMaj output)
Performs a matrix inversion operation that does not modify the original
and stores the results in another matrix. The two matrices must have the
same dimension.
b = a-1
If the algorithm could not invert the matrix then false is returned. If it returns true that just means the algorithm finished. The results could still be bad because the matrix is singular or nearly singular.
For medium to large matrices there might be a slight performance boost to using
LinearSolverFactory_ZDRM
instead.
input
- The matrix that is to be inverted. Not modified.output
- Where the inverse matrix is stored. Modified.public static boolean solve(org.ejml.data.ZMatrixRMaj a, org.ejml.data.ZMatrixRMaj b, org.ejml.data.ZMatrixRMaj x)
Solves for x in the following equation:
A*x = b
If the system could not be solved then false is returned. If it returns true that just means the algorithm finished operating, but the results could still be bad because 'A' is singular or nearly singular.
If repeat calls to solve are being made then one should consider using LinearSolverFactory_ZDRM
instead.
It is ok for 'b' and 'x' to be the same matrix.
a
- A matrix that is m by n. Not modified.b
- A matrix that is n by k. Not modified.x
- A matrix that is m by k. Modified.public static org.ejml.data.Complex_F64 det(org.ejml.data.ZMatrixRMaj mat)
LUDecompositionAlt_ZDRM
directly (or any
similar algorithm) can be more efficient.mat
- The matrix whose determinant is to be computed. Not modified.public static void elementMultiply(org.ejml.data.ZMatrixD1 input, double real, double imaginary, org.ejml.data.ZMatrixD1 output)
Performs element by element multiplication operation with a complex numbert
outputij = inputij * (real + imaginary*i)
input
- The left matrix in the multiplication operation. Not modified.real
- Real component of the number it is multiplied byimaginary
- Imaginary component of the number it is multiplied byoutput
- Where the results of the operation are stored. Modified.public static void elementDivide(org.ejml.data.ZMatrixD1 input, double real, double imaginary, org.ejml.data.ZMatrixD1 output)
Performs element by element division operation with a complex number on the right
outputij = inputij / (real + imaginary*i)
input
- The left matrix in the multiplication operation. Not modified.real
- Real component of the number it is multiplied byimaginary
- Imaginary component of the number it is multiplied byoutput
- Where the results of the operation are stored. Modified.public static void elementDivide(double real, double imaginary, org.ejml.data.ZMatrixD1 input, org.ejml.data.ZMatrixD1 output)
Performs element by element division operation with a complex number on the right
outputij = (real + imaginary*i) / inputij
real
- Real component of the number it is multiplied byimaginary
- Imaginary component of the number it is multiplied byinput
- The right matrix in the multiplication operation. Not modified.output
- Where the results of the operation are stored. Modified.public static double elementMinReal(org.ejml.data.ZMatrixD1 a)
Returns the value of the real element in the matrix that has the minimum value.
Min{ aij } for all i and j
a
- A matrix. Not modified.public static double elementMinImaginary(org.ejml.data.ZMatrixD1 a)
Returns the value of the imaginary element in the matrix that has the minimum value.
Min{ aij } for all i and j
a
- A matrix. Not modified.public static double elementMaxReal(org.ejml.data.ZMatrixD1 a)
Returns the value of the real element in the matrix that has the minimum value.
Min{ aij } for all i and j
a
- A matrix. Not modified.public static double elementMaxImaginary(org.ejml.data.ZMatrixD1 a)
Returns the value of the imaginary element in the matrix that has the minimum value.
Min{ aij } for all i and j
a
- A matrix. Not modified.public static double elementMaxMagnitude2(org.ejml.data.ZMatrixD1 a)
Returns the magnitude squared of the complex element with the largest magnitude
Max{ |aij|^2 } for all i and j
a
- A matrix. Not modified.public static void setIdentity(org.ejml.data.ZMatrixRMaj mat)
mat
- A square matrix.public static org.ejml.data.ZMatrixRMaj extract(org.ejml.data.ZMatrixRMaj src, int srcY0, int srcY1, int srcX0, int srcX1)
Creates a new matrix which is the specified submatrix of 'src'
si-y0 , j-x0 = oij for all y0 ≤ i < y1 and x0 ≤ j < x1
where 'sij' is an element in the submatrix and 'oij' is an element in the
original matrix.
src
- The original matrix which is to be copied. Not modified.srcX0
- Start column.srcX1
- Stop column+1.srcY0
- Start row.srcY1
- Stop row+1.public static void extract(org.ejml.data.ZMatrixRMaj src, int srcY0, int srcY1, int srcX0, int srcX1, org.ejml.data.ZMatrixRMaj dst, int dstY0, int dstX0)
Extracts a submatrix from 'src' and inserts it in a submatrix in 'dst'.
si-y0 , j-x0 = oij for all y0 ≤ i < y1 and x0 ≤ j < x1
where 'sij' is an element in the submatrix and 'oij' is an element in the
original matrix.
src
- The original matrix which is to be copied. Not modified.srcX0
- Start column.srcX1
- Stop column+1.srcY0
- Start row.srcY1
- Stop row+1.dst
- Where the submatrix are stored. Modified.dstY0
- Start row in dst.dstX0
- start column in dst.public static org.ejml.data.ZMatrixRMaj[] columnsToVector(org.ejml.data.ZMatrixRMaj A, org.ejml.data.ZMatrixRMaj[] v)
A
- Matrix. Not modified.v
- Optional storage for columns.public static double elementMaxAbs(org.ejml.data.ZMatrixRMaj a)
Returns the absolute value of the element in the matrix that has the largest absolute value.
Max{ |aij| } for all i and j
a
- A matrix. Not modified.