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

Gilles Sadowski updated NUMBERS-164:
------------------------------------
    Description: 
Method is currently in utility class 
[{{MathArrays}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java;h=10a8ed15c848c0da08fc92bfd72907dd75d9cd47;hb=HEAD#l612].

Proposed API:
{code}
public enum Sort implements BiConsumer<double[],double[][]> {
    /** Sort in ascending order. */
    ASCENDING((o1, o2) -> Double.compare(o1.key(), o2.key())),
    /** Sort in descending order. */
    DESCENDING(ASCENDING.comparator.reversed());

    // ...

    @Override
    public void accept(double[] x,
                       double[]... yList) {
        // ...
    }
}
{code}


  was:Method is currently in utility class 
[{{MathArrays}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java;h=10a8ed15c848c0da08fc92bfd72907dd75d9cd47;hb=HEAD#l612].


> Port "sortInPlace" from Commons Math
> ------------------------------------
>
>                 Key: NUMBERS-164
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-164
>             Project: Commons Numbers
>          Issue Type: Task
>          Components: arrays
>            Reporter: Gilles Sadowski
>            Assignee: Gilles Sadowski
>            Priority: Minor
>              Labels: api, port
>             Fix For: 1.0
>
>
> Method is currently in utility class 
> [{{MathArrays}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java;h=10a8ed15c848c0da08fc92bfd72907dd75d9cd47;hb=HEAD#l612].
> Proposed API:
> {code}
> public enum Sort implements BiConsumer<double[],double[][]> {
>     /** Sort in ascending order. */
>     ASCENDING((o1, o2) -> Double.compare(o1.key(), o2.key())),
>     /** Sort in descending order. */
>     DESCENDING(ASCENDING.comparator.reversed());
>     // ...
>     @Override
>     public void accept(double[] x,
>                        double[]... yList) {
>         // ...
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to