Tutorial Complex
Jump to navigation
Jump to search
The introduction of complex matrices to EJML is very recent and he best way to handle them is still undecided. The only way to manipulate complex matrices is using a procedural interface. The complex analog for each procedural class can be found for the complex case by adding "C" infront of it. Here are a few examples:
Real | Complex |
---|---|
CommonOps | CCommonOps |
MatrixFeature | CMatrixFeatures |
NormOps | CNormOps |
RandomMatrices | CRandomMatrices |
SpecializedOps | CSpecializedOps |
The complex analog of DenseMatrix64F is DenseMatrixC64F. The following functions provide different ways to convert one matrix type into the other.
Function | Description |
---|---|
CommonOps.convert() | Converts a real matrix into a complex matrix |
CommonOps.stripReal() | Strips the real component and places it into a real matrix. |
CommonOps.stripImaginary() | Strips the imaginary component and places it into a real matrix. |
CommonOps.magnitude() | Computes the magnitude of each element and places it into a real matrix. |
There is also Complex64F which contains a single complex number. Example Complex Math does a good job covering how to manipulate those objects.