Refactored how MathFunctions are structured to use more primitives and less objects. Optimized competing risk group differentiators to run faster. Removed alternative competing risk response combiners (may be added back later)
15 lines
378 B
Java
15 lines
378 B
Java
package ca.joeltherrien.randomforest.utils;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
@RequiredArgsConstructor
|
|
public class SumFunction implements MathFunction{
|
|
|
|
private final MathFunction function1;
|
|
private final MathFunction function2;
|
|
|
|
@Override
|
|
public double evaluate(double time) {
|
|
return function1.evaluate(time) + function2.evaluate(time);
|
|
}
|
|
}
|