T
- feature-input-typepublic class FeatureCalculatorSingleChangeInput<T extends FeatureInput> extends Object implements FeatureCalculatorSingle<T>
FeatureCalculatorSingle
but changes the input before calculation.Constructor and Description |
---|
FeatureCalculatorSingleChangeInput(FeatureCalculatorSingle<T> calculator,
java.util.function.Consumer<T> change) |
Modifier and Type | Method and Description |
---|---|
double |
calculate(T input)
Calculate the results of the feature with a particular input.
|
double |
calculateSuppressErrors(T input,
ErrorReporter errorReporter)
Calculates the result for an
input recording the error to an ErrorReporter if
anything goes wrong, but throwing no exception. |
public FeatureCalculatorSingleChangeInput(FeatureCalculatorSingle<T> calculator, java.util.function.Consumer<T> change)
public double calculate(T input) throws FeatureCalculationException
FeatureCalculatorSingle
calculate
in interface FeatureCalculatorSingle<T extends FeatureInput>
input
- the input to calculate.FeatureCalculationException
- if the feature cannot be successfully calculated.public double calculateSuppressErrors(T input, ErrorReporter errorReporter)
FeatureCalculatorSingle
input
recording the error to an ErrorReporter
if
anything goes wrong, but throwing no exception.calculateSuppressErrors
in interface FeatureCalculatorSingle<T extends FeatureInput>
input
- the input to calculate.errorReporter
- where errors are recorded.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.