T
- feature-input-typepublic class FeatureCalculatorMultiChangeInput<T extends FeatureInput> extends Object implements FeatureCalculatorMulti<T>
FeatureCalculatorMulti
but changes the input before calculation.Constructor and Description |
---|
FeatureCalculatorMultiChangeInput(FeatureCalculatorMulti<T> calculator,
java.util.function.Consumer<T> change) |
Modifier and Type | Method and Description |
---|---|
ResultsVector |
calculate(T input)
Calculate the results of the features with a particular input.
|
ResultsVector |
calculate(T input,
FeatureList<T> featuresSubset)
Calculates the results of a subset of the features with a particular input.
|
ResultsVector |
calculateSuppressErrors(T input,
ErrorReporter errorReporter)
Calculates the results for an
input recording the error to an ErrorReporter
if anything goes wrong, but throwing no exception. |
int |
sizeFeatures()
The number of features that is calculated on each call to
FeatureCalculatorMulti.calculate(T) , and therefore
the size of the returned ResultsVector . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calculate
public FeatureCalculatorMultiChangeInput(FeatureCalculatorMulti<T> calculator, java.util.function.Consumer<T> change)
public ResultsVector calculate(T input) throws NamedFeatureCalculateException
FeatureCalculatorMulti
calculate
in interface FeatureCalculatorMulti<T extends FeatureInput>
input
- the input to calculate.NamedFeatureCalculateException
- if any feature cannot be successfully calculated.public ResultsVector calculate(T input, FeatureList<T> featuresSubset) throws NamedFeatureCalculateException
FeatureCalculatorMulti
calculate
in interface FeatureCalculatorMulti<T extends FeatureInput>
input
- the input to calculate.featuresSubset
- the subset of features (from those bound to the current instance) to
calculate with.NamedFeatureCalculateException
- if any feature cannot be successfully calculated.public ResultsVector calculateSuppressErrors(T input, ErrorReporter errorReporter)
FeatureCalculatorMulti
input
recording the error to an ErrorReporter
if anything goes wrong, but throwing no exception.calculateSuppressErrors
in interface FeatureCalculatorMulti<T extends FeatureInput>
input
- the input to calculate.errorReporter
- where errors are recorded.public int sizeFeatures()
FeatureCalculatorMulti
FeatureCalculatorMulti.calculate(T)
, and therefore
the size of the returned ResultsVector
.sizeFeatures
in interface FeatureCalculatorMulti<T extends FeatureInput>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.