Difference between revisions of "Tutorial Complex"
Jump to navigation
Jump to search
(Created page with "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 procedur...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Most real operations in EJML have a complex analog. For example, CommonOps_DDRM has the complex equivalent of CommonOps_ZDRM. ZMatrixRMaj is the complex analog for DMatrixRMaj. Floats are also support, e.g. FDRM -> CDRM. See tutorial on [[Procedural|procedural interface]] for a table of suffixes. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | The complex | + | The following specialized functions are contained inside the complex CommonOps class. They different ways to convert one matrix type into the other. |
{| class="wikitable" | {| class="wikitable" | ||
! Function !! Description | ! Function !! Description | ||
|- | |- | ||
− | | | + | | CommonOps_ZDRM.convert() || Converts a real matrix into a complex matrix |
|- | |- | ||
− | | | + | | CommonOps_ZDRM.stripReal() || Strips the real component and places it into a real matrix. |
|- | |- | ||
− | | | + | | CommonOps_ZDRM.stripImaginary() || Strips the imaginary component and places it into a real matrix. |
|- | |- | ||
− | | | + | | CommonOps_ZDRM.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. | There is also Complex64F which contains a single complex number. [[Example Complex Math]] does a good job covering how to manipulate those objects. |
Latest revision as of 21:16, 17 May 2017
Most real operations in EJML have a complex analog. For example, CommonOps_DDRM has the complex equivalent of CommonOps_ZDRM. ZMatrixRMaj is the complex analog for DMatrixRMaj. Floats are also support, e.g. FDRM -> CDRM. See tutorial on procedural interface for a table of suffixes.
The following specialized functions are contained inside the complex CommonOps class. They different ways to convert one matrix type into the other.
Function | Description |
---|---|
CommonOps_ZDRM.convert() | Converts a real matrix into a complex matrix |
CommonOps_ZDRM.stripReal() | Strips the real component and places it into a real matrix. |
CommonOps_ZDRM.stripImaginary() | Strips the imaginary component and places it into a real matrix. |
CommonOps_ZDRM.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.