Class FeatureSingleMemo
An abstract base class for features that operate on a single memoized object.
This class extends Feature
and specifies FeatureInputSingleMemo
as the input
type for feature calculations. It is designed to be used with features that need to process a
single memoized object, typically for performance optimization in energy calculations.
Subclasses must implement the calculate(FeatureCalculationInput)
method to define the
specific feature calculation logic.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract double
Calculates a value for some input.Class
<? extends FeatureInput> The class corresponding to feature input-type.Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
FeatureSingleMemo
public FeatureSingleMemo()
-
-
Method Details
-
calculate
public abstract double calculate(FeatureCalculationInput<FeatureInputSingleMemo> input) throws FeatureCalculationException Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputSingleMemo>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
inputType
Description copied from class:Feature
The class corresponding to feature input-type.i.e. corresponding to the
T
template parameter.- Specified by:
inputType
in classFeature<FeatureInputSingleMemo>
- Returns:
- the class.
-