Class CompareWithRange<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
RangeCompareBase<T>
RangeCompareFromScalars<T>
CompareWithRange<T>
- Type Parameters:
T- feature-input-type
Compares a value with a range, returning specified constants if its inside the range, below it or
above it
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of the parameterization of the bean.Specifies which feature to calculate the input value.doubleConstant to return if value lies within the rangevoidsetWithinValue(double withinValue) Constant to return if value lies within the rangeprotected doublewithinRangeValue(double valWithinRange, FeatureCalculationInput<T> input) Calculates the value to return if the input is within the range.Methods inherited from class org.anchoranalysis.plugin.operator.feature.bean.range.RangeCompareFromScalars
boundaryMax, boundaryMin, getMax, getMin, setMax, setMinMethods inherited from class org.anchoranalysis.plugin.operator.feature.bean.range.RangeCompareBase
calculate, getAboveMaxValue, getBelowMinValue, setAboveMaxValue, setBelowMinValueMethods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItemMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
CompareWithRange
public CompareWithRange()
-
-
Method Details
-
featureToCalcInputValue
Description copied from class:RangeCompareBaseSpecifies which feature to calculate the input value.- Specified by:
featureToCalcInputValuein classRangeCompareBase<T extends FeatureInput>- Returns:
- the
Featureused to calculate the input value
-
withinRangeValue
protected double withinRangeValue(double valWithinRange, FeatureCalculationInput<T> input) throws FeatureCalculationException Description copied from class:RangeCompareBaseCalculates the value to return if the input is within the range.- Specified by:
withinRangeValuein classRangeCompareBase<T extends FeatureInput>- Parameters:
valWithinRange- the input value that is within the rangeinput- theFeatureCalculationInputto use for calculation- Returns:
- the calculated value
- Throws:
FeatureCalculationException- if the calculation fails
-
describeParameters
Description copied from class:FeatureA human-readable description of the parameterization of the bean.- Overrides:
describeParametersin classRangeCompareFromScalars<T extends FeatureInput>- Returns:
- the description.
-
getWithinValue
public double getWithinValue()Constant to return if value lies within the range -
setWithinValue
public void setWithinValue(double withinValue) Constant to return if value lies within the range
-