T
- input-type for featurepublic class SequentialSession<T extends FeatureInput> extends Object implements FeatureCalculatorMulti<T>
i.e. caching is applied only within each call to calculate(FeatureInput)
not but
among successive calls.
All feature use the same initialization, but successively different {#FeatureCalculation} sequentially.
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 the next input in the session, reporting any exceptions into an
ErrorReporter . |
int |
sizeFeatures()
The number of features that is calculated on each call to
FeatureCalculatorMulti.calculate(T) , and therefore
the size of the returned ResultsVector . |
void |
start(FeatureInitialization initialization,
SharedFeatures sharedFeatures,
Logger logger)
Starts the session.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calculate
public void start(FeatureInitialization initialization, SharedFeatures sharedFeatures, Logger logger) throws InitializeException
initialization
- the parameters used to initialize the feature.logger
- the logger.sharedFeatures
- features that can be referenced by all the features being calculated in
the session. They are also initialized by this session.InitializeException
- if any initialization fails to complete successfully.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)
ErrorReporter
.calculateSuppressErrors
in interface FeatureCalculatorMulti<T extends FeatureInput>
input
- the input to calculate results for.errorReporter
- where to report errors to.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.