Skip to content

Commit 226b224

Browse files
committed
Ensure math ops use all aliases
Binary[Numeric/Real]TypeMath ops need to be indexed under all the aliases from org.scijava.ops.engine.math.MathOps for consistency.
1 parent ea1884b commit 226b224

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryNumericTypeMath.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class BinaryNumericTypeMath <T extends NumericType<T>> {
6363
* @input input2
6464
* @input divideByZeroValue
6565
* @container result
66-
* @implNote op names='math.divide', priority='100.'
66+
* @implNote op names='math.div, math.divide', priority='100.'
6767
*/
6868
public final Computers.Arity3<T, T, T, T> divider = (input1, input2, dbzVal, output) -> {
6969
try {
@@ -80,20 +80,20 @@ public class BinaryNumericTypeMath <T extends NumericType<T>> {
8080
* @input input1
8181
* @input input2
8282
* @container result
83-
* @implNote op names='math.multiply', priority='100.'
83+
* @implNote op names='math.mul, math.multiply', priority='100.'
8484
*/
8585
public final Computers.Arity2<T, T, T> multiplier = (input1, input2, output) -> {
8686
output.set(input1);
8787
output.mul(input2);
8888
};
8989

90-
/*
90+
/**
9191
* Sets the real component of an output real number to the subtraction between
9292
* the real component of two input real numbers.
9393
* @input input1
9494
* @input input2
9595
* @container result
96-
* @implNote op names='math.subtract', priority='100.'
96+
* @implNote op names='math.sub, math.subtract', priority='100.'
9797
*/
9898
public final Computers.Arity2<T, T, T> subtracter = (input1, input2, output) -> {
9999
output.set(input1);

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryRealTypeMath.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class BinaryRealTypeMath <I1 extends RealType<I1>, I2 extends RealType<I2
7272
* @input input2
7373
* @input divideByZeroValue
7474
* @container result
75-
* @implNote op names='math.divide'
75+
* @implNote op names='math.div, math.divide'
7676
*/
7777
public final Computers.Arity3<I1, I2, Double, O> divider = (input1, input2, dbzVal, output) -> {
7878
if (input2.getRealDouble() == 0) {
@@ -89,7 +89,7 @@ public class BinaryRealTypeMath <I1 extends RealType<I1>, I2 extends RealType<I2
8989
* @input input1
9090
* @input input2
9191
* @container result
92-
* @implNote op names='math.multiply'
92+
* @implNote op names='math.mul, math.multiply'
9393
*/
9494
public final Computers.Arity2<I1, I2, O> multiplier = (input1, input2, output) ->
9595
output.setReal(input1.getRealDouble() * input2.getRealDouble());
@@ -112,7 +112,7 @@ public class BinaryRealTypeMath <I1 extends RealType<I1>, I2 extends RealType<I2
112112
* @input input1
113113
* @input input2
114114
* @container result
115-
* @implNote op names='math.subtract'
115+
* @implNote op names=`math.sub, math.subtract`
116116
*/
117117
public final Computers.Arity2<I1, I2, O> subtracter = (input1, input2, output) ->
118118
output.setReal(input1.getRealDouble() - input2.getRealDouble());

‎imagej/imagej-ops2/src/test/java/net/imagej/ops2/OpRegressionTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class OpRegressionTest extends AbstractOpTest {
3939

4040
@Test
4141
public void opDiscoveryRegressionIT() {
42-
long expected = 1835;
42+
long expected = 1836;
4343
long actual = ops.infos().size();
4444
assertEquals(expected, actual);
4545
}

0 commit comments

Comments
 (0)