T
- feature input-typepublic class FeatureCalculatorSingleFromMulti<T extends FeatureInput> extends Object implements FeatureCalculatorSingle<T>
FeatureCalculatorMulti
as a FeatureCalculatorSingle
.Constructor and Description |
---|
FeatureCalculatorSingleFromMulti(FeatureCalculatorMulti<T> multi)
Creates from a
FeatureCalculatorMulti . |
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 FeatureCalculatorSingleFromMulti(FeatureCalculatorMulti<T> multi) throws InitializeException
FeatureCalculatorMulti
.multi
- the calculator to expose as a FeatureCalculatorSingle
.InitializeException
- if multi
has more than one feature.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.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.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.