Class SequentialSession<T extends FeatureInput>
Object
SequentialSession<T>
- Type Parameters:
T- input-type for feature
- All Implemented Interfaces:
FeatureCalculatorMulti<T>
public class SequentialSession<T extends FeatureInput>
extends Object
implements FeatureCalculatorMulti<T>
Calculates features with successively different inputs, without caching any results from one
input to the next.
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.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionCalculate the results of the features with a particular input.calculate(T input, FeatureList<T> featuresSubset) Calculates the results of a subset of the features with a particular input.calculateSuppressErrors(T input, ErrorReporter errorReporter) Calculates the results for the next input in the session, reporting any exceptions into anErrorReporter.intThe number of features that is calculated on each call toFeatureCalculatorMulti.calculate(T), and therefore the size of the returnedResultsVector.voidstart(FeatureInitialization initialization, SharedFeatures sharedFeatures, Logger logger) Starts the session.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.anchoranalysis.feature.calculate.bound.FeatureCalculatorMulti
calculate
-
Method Details
-
calculate
Description copied from interface:FeatureCalculatorMultiCalculate the results of the features with a particular input.- Specified by:
calculatein interfaceFeatureCalculatorMulti<T extends FeatureInput>- Parameters:
input- the input to calculate.- Returns:
- the results of the calculation.
- Throws:
NamedFeatureCalculateException- if any feature cannot be successfully calculated.
-
calculate
public ResultsVector calculate(T input, FeatureList<T> featuresSubset) throws NamedFeatureCalculateException Description copied from interface:FeatureCalculatorMultiCalculates the results of a subset of the features with a particular input.- Specified by:
calculatein interfaceFeatureCalculatorMulti<T extends FeatureInput>- Parameters:
input- the input to calculate.featuresSubset- the subset of features (from those bound to the current instance) to calculate with.- Returns:
- the results of the calculation.
- Throws:
NamedFeatureCalculateException- if any feature cannot be successfully calculated.
-
calculateSuppressErrors
Calculates the results for the next input in the session, reporting any exceptions into anErrorReporter.- Specified by:
calculateSuppressErrorsin interfaceFeatureCalculatorMulti<T extends FeatureInput>- Parameters:
input- the input to calculate results for.errorReporter- where to report errors to.- Returns:
- the calculated results.
-
sizeFeatures
public int sizeFeatures()Description copied from interface:FeatureCalculatorMultiThe number of features that is calculated on each call toFeatureCalculatorMulti.calculate(T), and therefore the size of the returnedResultsVector.- Specified by:
sizeFeaturesin interfaceFeatureCalculatorMulti<T extends FeatureInput>- Returns:
- the number of features.