[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    Re: commons-numbers git commit: NUMBERS-13: Some tests in the old ComplexTest tested the old NaN beh
From:       Gilles <gilles () harfang ! homelinux ! org>
Date:       2017-07-31 14:54:14
Message-ID: 4364f6fbc3b3a222985192ae52bf7ab2 () scarlet ! be
[Download RAW message or body]

Eric,

On Mon, 31 Jul 2017 11:32:12 +0000 (UTC), ericbarnhill@apache.org 
wrote:
> Repository: commons-numbers
> Updated Branches:
> refs/heads/complex-dev 387f4e09b -> 0a01e2d0e
> 
> 
> NUMBERS-13: Some tests in the old ComplexTest tested the old NaN
> behavior (i.e. turn the whole Complex into NaN) and these were
> deleted. There is also an error in the testSerial() method and this
> has been commented out for the time being so that the package
> installs.

The message does not seem to apply to the changes reported below.

Gilles

P.S. Nit-pick about git log: One short summary line would avoid
      lengthy "Subject: " line in notification email.


> Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
> Commit:
> 
> http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/0a01e2d0
> Tree: 
> http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/0a01e2d0
> Diff: 
> http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/0a01e2d0
> 
> Branch: refs/heads/complex-dev
> Commit: 0a01e2d0e7e6c6621cbf6b5c2c7da885c1691c07
> Parents: 387f4e0
> Author: Eric Barnhill <ericbarnhill@apache.org>
> Authored: Mon Jul 31 13:34:18 2017 +0200
> Committer: Eric Barnhill <ericbarnhill@apache.org>
> Committed: Mon Jul 31 13:34:18 2017 +0200
> 
> 
> ----------------------------------------------------------------------
> .../commons/numbers/complex/ComplexUtils.java   | 36 
> ++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> 
> ----------------------------------------------------------------------
> 
> 
> 
> http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/0a01e2d0/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
>  
> ----------------------------------------------------------------------
> diff --git
> 
> a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
>  
> b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
>  index e41709c..529521d 100644
> ---
> 
> a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
>  +++
> 
> b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUtils.java
>  @@ -338,6 +338,24 @@ public class ComplexUtils {
> }
> 
> /**
> +     * Converts a 2D real {@code float[][]} array to a 2D {@code
> Complex[][]}
> +     * array.
> +     *
> +     * @param d 2D array
> +     * @return 2D {@code Complex} array
> +     *
> +     * @since 1.0
> +     */
> +    public static Complex[][] real2Complex(float[][] d) {
> +        final int w = d.length;
> +        final Complex[][] c = new Complex[w][];
> +        for (int n = 0; n < w; n++) {
> +            c[n] = ComplexUtils.real2Complex(d[n]);
> +        }
> +        return c;
> +    }
> +
> +    /**
> * Converts a 3D real {@code double[][][]} array to a {@code
> Complex [][][]}
> * array.
> *
> @@ -356,6 +374,24 @@ public class ComplexUtils {
> }
> 
> /**
> +     * Converts a 3D real {@code float[][][]} array to a {@code
> Complex [][][]}
> +     * array.
> +     *
> +     * @param d 3D complex interleaved array
> +     * @return 3D {@code Complex} array
> +     *
> +     * @since 1.0
> +     */
> +    public static Complex[][][] real2Complex(float[][][] d) {
> +        final int w = d.length;
> +        final Complex[][][] c = new Complex[w][][];
> +        for (int x = 0; x < w; x++) {
> +            c[x] = ComplexUtils.real2Complex(d[x]);
> +        }
> +        return c;
> +    }
> +
> +    /**
> * Converts a 4D real {@code double[][][][]} array to a {@code
> Complex [][][][]}
> * array.
> *


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic