Is there an (elegant) way to define a min/max lambda expression?
public class MathFunction{
private java.util.function.Function <double[], Double> function = null;
public MathFunction ( Function <double[], Double> pFunction ){
this.function = pFunction;
}
}
// now defining a min-function...
MathFunction func = new MathFunction((x) -> min(x));
Of course min(x) does not work. I need a way to sort an array "on the fly".