Skip to content

Commit 15e9c9e

Browse files
Treiblesschorlectrueden
authored andcommitted
Remove explicit Op that can be implicitly created using auto transform
1 parent 42edb09 commit 15e9c9e

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

  • src/main/java/org/scijava/ops/math

src/main/java/org/scijava/ops/math/Add.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,20 @@ public Double apply(Double t, Double u) {
3232
}
3333
}
3434

35-
@Plugin(type = Op.class, priority = Priority.HIGH, name = NAMES)
36-
@Parameter(key = "array1")
37-
@Parameter(key = "array2")
38-
@Parameter(key = "resultArray", type = ItemIO.OUTPUT)
39-
public static class MathPointwiseAddDoubleArraysFunction
40-
implements BiFunction<double[], double[], double[]> {
41-
@Override
42-
public double[] apply(double[] arr1, double[] arr2) {
43-
Stream<Double> s1 = Arrays.stream(arr1).boxed();
44-
Stream<Double> s2 = Arrays.stream(arr2).boxed();
45-
return Streams.zip(s1, s2, (num1, num2) -> num1 + num2).mapToDouble(Double::doubleValue).toArray();
46-
}
47-
}
35+
// This Op is not needed anymore, can be handled via auto op transformation
36+
// @Plugin(type = Op.class, priority = Priority.HIGH, name = NAMES)
37+
// @Parameter(key = "array1")
38+
// @Parameter(key = "array2")
39+
// @Parameter(key = "resultArray", type = ItemIO.OUTPUT)
40+
// public static class MathPointwiseAddDoubleArraysFunction
41+
// implements BiFunction<double[], double[], double[]> {
42+
// @Override
43+
// public double[] apply(double[] arr1, double[] arr2) {
44+
// Stream<Double> s1 = Arrays.stream(arr1).boxed();
45+
// Stream<Double> s2 = Arrays.stream(arr2).boxed();
46+
// return Streams.zip(s1, s2, (num1, num2) -> num1 + num2).mapToDouble(Double::doubleValue).toArray();
47+
// }
48+
// }
4849

4950
@Plugin(type = Op.class, priority = Priority.HIGH, name = NAMES)
5051
@Parameter(key = "iter1")

0 commit comments

Comments
 (0)