You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2018/03/17 23:50:00 UTC

[jira] [Updated] (NUMBERS-56) Wrong dimension check?

     [ https://issues.apache.org/jira/browse/NUMBERS-56?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles updated NUMBERS-56:
--------------------------
    Description: 
In {{ComplexUtils}}, at line 989:
{code:java}
public static double[][][][] complex2Interleaved(Complex[][][][] c, int interleavedDim) {
    if (interleavedDim > 2 || interleavedDim < 0) {
        throw new IndexOutOfRangeException(interleavedDim);
    }
    // ...
}
{code}
at line 1261:
{code:java}
public static Complex[][][] interleaved2Complex(double[][][] i, int interleavedDim) {
    if (interleavedDim > 2 || interleavedDim < 0) {
        throw new IndexOutOfRangeException(interleavedDim);
    }
    // ...
}
{code}
Shouldn't the upper bound be 3?

  was:
In {{ComplexUtils}} (line 989):
{code:java}
public static double[][][][] complex2Interleaved(Complex[][][][] c, int interleavedDim) {
    if (interleavedDim > 2 || interleavedDim < 0) {
        throw new IndexOutOfRangeException(interleavedDim);
    }
    // ...
}
{code}
Shouldn't the upper bound be 3?


> Wrong dimension check?
> ----------------------
>
>                 Key: NUMBERS-56
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-56
>             Project: Commons Numbers
>          Issue Type: Bug
>          Components: complex
>            Reporter: Gilles
>            Priority: Trivial
>             Fix For: 1.0
>
>
> In {{ComplexUtils}}, at line 989:
> {code:java}
> public static double[][][][] complex2Interleaved(Complex[][][][] c, int interleavedDim) {
>     if (interleavedDim > 2 || interleavedDim < 0) {
>         throw new IndexOutOfRangeException(interleavedDim);
>     }
>     // ...
> }
> {code}
> at line 1261:
> {code:java}
> public static Complex[][][] interleaved2Complex(double[][][] i, int interleavedDim) {
>     if (interleavedDim > 2 || interleavedDim < 0) {
>         throw new IndexOutOfRangeException(interleavedDim);
>     }
>     // ...
> }
> {code}
> Shouldn't the upper bound be 3?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)