Difference between revisions of "Tutorial Complex"

From Efficient Java Matrix Library
Jump to: navigation, search
m (Peter moved page Complex Math to Tutorial Complex)
 
Line 1: Line 1:
The introduction of complex matrices to EJML is very recent and he best way to handle them is still undecidedThe only way to manipulate complex matrices is using a procedural interfaceThe complex analog for each procedural class can be found for the complex case by adding "C" infront of it. Here are a few examples:
+
Most real operations in EJML have a complex analogFor example, CommonOps_DDRM has the complex equivalent of CommonOps_ZDRMZMatrixRMaj 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.  
  
{| class="wikitable"
 
! Real !! Complex
 
|-
 
| CommonOps || CCommonOps
 
|-
 
| MatrixFeature || CMatrixFeatures
 
|-
 
| NormOps || CNormOps
 
|-
 
| RandomMatrices || CRandomMatrices
 
|-
 
| SpecializedOps || CSpecializedOps
 
|}
 
  
The complex analog of DenseMatrix64F is DenseMatrixC64FThe following functions provide different ways to convert one matrix type into the other.
+
The following specialized functions are contained inside the complex CommonOps classThey different ways to convert one matrix type into the other.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Function !! Description
 
! Function !! Description
 
|-
 
|-
| CCommonOps.convert() || Converts a real matrix into a complex matrix
+
| CommonOps_ZDRM.convert() || Converts a real matrix into a complex matrix
 
|-
 
|-
| CCommonOps.stripReal() || Strips the real component and places it into a real matrix.
+
| CommonOps_ZDRM.stripReal() || Strips the real component and places it into a real matrix.
 
|-
 
|-
| CCommonOps.stripImaginary() || Strips the imaginary component and places it into a real matrix.
+
| CommonOps_ZDRM.stripImaginary() || Strips the imaginary component and places it into a real matrix.
 
|-
 
|-
| CCommonOps.magnitude() || Computes the magnitude of each element 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 22: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.