T
- underlying feature-input type.public interface FeatureCalculationInput<T extends FeatureInput>
FeatureInput
the necessary context for feature-calculation, including associating
it with a cache.
This is the recommended method for calculating the value of a Feature
as it allows
sensible caching / memoization to occur of subcomponents of the feature's computation (known as
CalculationPart
s.
Modifier and Type | Method and Description |
---|---|
FeatureSymbolCalculator<T> |
bySymbol()
Calculates a feature if only an symbol (ID/name) is known, which refers to another feature.
|
<S> S |
calculate(CalculationPart<S,T> calculation)
Calculates a feature-calculation after resolving it against the main cache.
|
double |
calculate(Feature<T> feature)
Calculates the result of a feature using this input.
|
ResultsVector |
calculate(FeatureList<T> features)
Calculates the results of several features using this input.
|
<S> S |
calculate(ResolvedPart<S,T> calculation)
Calculates a resolved Feature-calculation.
|
CalculateForChild<T> |
forChild()
Performs calculations not on the main cache, but on a child cache.
|
T |
get()
The underlying feature-input.
|
FeatureCalculationCache<T> |
getCache()
Get the associated
FeatureCalculationCache . |
CalculationPartResolver<T> |
resolver()
A resolver for calculations.
|
T get()
double calculate(Feature<T> feature) throws FeatureCalculationException
feature
- the feature to calculate with.FeatureCalculationException
- if a feature cannot be successfully calculated.ResultsVector calculate(FeatureList<T> features) throws NamedFeatureCalculateException
features
- features to calculate with.NamedFeatureCalculateException
- if any feature cannot be successfully calculated.<S> S calculate(CalculationPart<S,T> calculation) throws FeatureCalculationException
S
- return-type of the calculation.calculation
- the feature-calculation to resolve.FeatureCalculationException
- if a feature cannot be successfully calculated.<S> S calculate(ResolvedPart<S,T> calculation) throws FeatureCalculationException
S
- return-type of the calculation.calculation
- the feature-calculation to resolve.FeatureCalculationException
- if a feature cannot be successfully calculated.CalculationPartResolver<T> resolver()
CalculateForChild<T> forChild()
FeatureSymbolCalculator<T> bySymbol()
FeatureCalculationCache<T> getCache()
FeatureCalculationCache
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.