imagej / imagej-ops

ImageJ Ops: "Write once, run anywhere" image processing
https://imagej.net/libs/imagej-ops
BSD 2-Clause "Simplified" License
89 stars 42 forks source link

Change return type of IterableMax and IterableMin #560

Closed bnorthan closed 6 years ago

bnorthan commented 6 years ago

This pull request addresses #559 by implementing the solution proposed by @hanslovsky.

It also adds a small test to verify the return type is now the same as the input type.

ctrueden commented 6 years ago

Thanks @bnorthan!

While we're at it: do you think the min and max ops should use T extends Comparable<T> rather than T extends RealType<T>? It looks like the only tricky part would be the current hack of using getMinValue()/getMaxValue() for the initial value.