public class SingleTableCalculator extends Object implements FeatureTableCalculator<FeatureInputSingleObject>
Constructor and Description |
---|
SingleTableCalculator(NamedFeatureStore<FeatureInputSingleObject> namedFeatureStore) |
Modifier and Type | Method and Description |
---|---|
ResultsVector |
calculate(FeatureInputSingleObject input)
Calculate the results of the features with a particular input.
|
ResultsVector |
calculate(FeatureInputSingleObject input,
FeatureList<FeatureInputSingleObject> featuresSubset)
Calculates the results of a subset of the features with a particular input.
|
ResultsVector |
calculateSuppressErrors(FeatureInputSingleObject input,
ErrorReporter errorReporter)
Calculates the results for an
input recording the error to an ErrorReporter
if anything goes wrong, but throwing no exception. |
FeatureNameList |
createFeatureNames()
Creates A list of names for each feature (columns of the table)
|
FeatureTableCalculator<FeatureInputSingleObject> |
duplicateForNewThread()
Makes a copy of the feature-store for a new thread.
|
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(ImageInitialization initialization,
Optional<EnergyStack> energyStack,
Logger logger)
Initializes a feature store that has the same structure as that previously created by
createFeatures() from the same object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calculate
public SingleTableCalculator(NamedFeatureStore<FeatureInputSingleObject> namedFeatureStore)
public void start(ImageInitialization initialization, Optional<EnergyStack> energyStack, Logger logger) throws InitializeException
FeatureTableCalculator
start
in interface FeatureTableCalculator<FeatureInputSingleObject>
InitializeException
public FeatureTableCalculator<FeatureInputSingleObject> duplicateForNewThread()
FeatureTableCalculator
Deep-copies the features. Shallow-copies everything else.
duplicateForNewThread
in interface FeatureTableCalculator<FeatureInputSingleObject>
public ResultsVector calculate(FeatureInputSingleObject input) throws NamedFeatureCalculateException
FeatureCalculatorMulti
calculate
in interface FeatureCalculatorMulti<FeatureInputSingleObject>
input
- the input to calculate.NamedFeatureCalculateException
- if any feature cannot be successfully calculated.public ResultsVector calculate(FeatureInputSingleObject input, FeatureList<FeatureInputSingleObject> featuresSubset) throws NamedFeatureCalculateException
FeatureCalculatorMulti
calculate
in interface FeatureCalculatorMulti<FeatureInputSingleObject>
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(FeatureInputSingleObject input, ErrorReporter errorReporter)
FeatureCalculatorMulti
input
recording the error to an ErrorReporter
if anything goes wrong, but throwing no exception.calculateSuppressErrors
in interface FeatureCalculatorMulti<FeatureInputSingleObject>
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<FeatureInputSingleObject>
public FeatureNameList createFeatureNames()
FeatureTableCalculator
createFeatureNames
in interface FeatureTableCalculator<FeatureInputSingleObject>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.