T
- feature-typepublic class SessionInputSequential<T extends FeatureInput> extends Object implements FeatureCalculationInput<T>
SequentialSession
Constructor and Description |
---|
SessionInputSequential(T input,
CacheCreator cacheCreator)
Creates for a particular input and
CacheCreator , otherwise using defaults. |
SessionInputSequential(T input,
CacheCreator cacheCreator,
ChildCacheFinder findChild)
Creates for a particular input,
CacheCreator and ChildCacheFinder . |
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> cc)
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 . |
void |
replaceInput(T input)
Replaces existing input with new input
|
CalculationPartResolver<T> |
resolver()
A resolver for calculations.
|
public SessionInputSequential(T input, CacheCreator cacheCreator)
CacheCreator
, otherwise using defaults.input
- input for feature calculation.cacheCreator
- creates a cache.public SessionInputSequential(T input, CacheCreator cacheCreator, ChildCacheFinder findChild)
CacheCreator
and ChildCacheFinder
.input
- input for feature calculation.cacheCreator
- creates a cache.findChild
- locates a particular child-cache.public void replaceInput(T input)
input
- new parameters which will replace existing onespublic T get()
FeatureCalculationInput
get
in interface FeatureCalculationInput<T extends FeatureInput>
public double calculate(Feature<T> feature) throws FeatureCalculationException
FeatureCalculationInput
calculate
in interface FeatureCalculationInput<T extends FeatureInput>
feature
- the feature to calculate with.FeatureCalculationException
- if a feature cannot be successfully calculated.public ResultsVector calculate(FeatureList<T> features) throws NamedFeatureCalculateException
FeatureCalculationInput
calculate
in interface FeatureCalculationInput<T extends FeatureInput>
features
- features to calculate with.NamedFeatureCalculateException
- if any feature cannot be successfully calculated.public <S> S calculate(CalculationPart<S,T> cc) throws FeatureCalculationException
FeatureCalculationInput
calculate
in interface FeatureCalculationInput<T extends FeatureInput>
S
- return-type of the calculation.cc
- the feature-calculation to resolve.FeatureCalculationException
- if a feature cannot be successfully calculated.public <S> S calculate(ResolvedPart<S,T> calculation) throws FeatureCalculationException
FeatureCalculationInput
calculate
in interface FeatureCalculationInput<T extends FeatureInput>
S
- return-type of the calculation.calculation
- the feature-calculation to resolve.FeatureCalculationException
- if a feature cannot be successfully calculated.public CalculationPartResolver<T> resolver()
FeatureCalculationInput
resolver
in interface FeatureCalculationInput<T extends FeatureInput>
public FeatureSymbolCalculator<T> bySymbol()
FeatureCalculationInput
bySymbol
in interface FeatureCalculationInput<T extends FeatureInput>
public CalculateForChild<T> forChild()
FeatureCalculationInput
forChild
in interface FeatureCalculationInput<T extends FeatureInput>
public FeatureCalculationCache<T> getCache()
FeatureCalculationInput
FeatureCalculationCache
.getCache
in interface FeatureCalculationInput<T extends FeatureInput>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.