public abstract class RangeCompareBase<T extends FeatureInput> extends FeatureUnaryGeneric<T>
Constructor and Description |
---|
RangeCompareBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract double |
boundaryMax(FeatureCalculationInput<T> input)
Boundary to define the maximum accepted value in the range
|
protected abstract double |
boundaryMin(FeatureCalculationInput<T> input)
Boundary to define the minimum accepted value in the range
|
double |
calculate(FeatureCalculationInput<T> input)
Calculates a value for some input.
|
String |
describeParameters()
A human-readable description of the parameterization of the bean.
|
protected abstract Feature<T> |
featureToCalcInputVal()
Which feature to calculate the input-value? The result is then passed to
calculateForValue(double, org.anchoranalysis.feature.calculate.FeatureCalculationInput<T>) |
double |
getAboveMaxValue()
Constant to return if outside the range (above the maximum allowed)
|
double |
getBelowMinValue()
Constant to return if outside the range (below the minimum allowed)
|
void |
setAboveMaxValue(double aboveMaxValue)
Constant to return if outside the range (above the maximum allowed)
|
void |
setBelowMinValue(double belowMinValue)
Constant to return if outside the range (below the minimum allowed)
|
protected abstract double |
withinRangeValue(double valWithinRange,
FeatureCalculationInput<T> input)
What value to return if the value is inside the range
|
getItem, inputType, setItem
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
public double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
Feature
calculate
in class Feature<T extends FeatureInput>
input
- the input to the calculation.FeatureCalculationException
- if the calculation cannot successfully complete.protected abstract double boundaryMin(FeatureCalculationInput<T> input) throws FeatureCalculationException
FeatureCalculationException
protected abstract double boundaryMax(FeatureCalculationInput<T> input) throws FeatureCalculationException
FeatureCalculationException
protected abstract Feature<T> featureToCalcInputVal()
calculateForValue(double, org.anchoranalysis.feature.calculate.FeatureCalculationInput<T>)
protected abstract double withinRangeValue(double valWithinRange, FeatureCalculationInput<T> input) throws FeatureCalculationException
FeatureCalculationException
public String describeParameters()
Feature
describeParameters
in class Feature<T extends FeatureInput>
public double getBelowMinValue()
public void setBelowMinValue(double belowMinValue)
public double getAboveMaxValue()
public void setAboveMaxValue(double aboveMaxValue)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.