diff options
Diffstat (limited to 'src/type/doubleComplex.c')
-rw-r--r-- | src/type/doubleComplex.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/type/doubleComplex.c b/src/type/doubleComplex.c index 753e9e35..02976237 100644 --- a/src/type/doubleComplex.c +++ b/src/type/doubleComplex.c @@ -55,9 +55,33 @@ double zreals(doubleComplex z) { double zimags(doubleComplex z) { return cimag(z); } +#endif +/* +** \function creala +** \brief Return a Complex Real Part array. +*/ +void zreala(doubleComplex* z, int size, double* out) { + int i = 0; -#endif + for (i = 0 ; i < size ; ++i) + { + out[i] = zreals(z[i]); + } +} + +/* +** \function cimaga +** \brief Return a Complex Imaginary Part array. +*/ +void zimaga(doubleComplex* z, int size, double* out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) + { + out[i] = zimags(z[i]); + } +} /* ** \function DoubleComplex |