Class CompareWithRangeFeature<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
RangeCompareBase<T>
CompareWithRangeFeature<T>
- Type Parameters:
T
- feature-input type
Like
CompareWithRange
but uses features to calculate boundary values- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
boundaryMax
(FeatureCalculationInput<T> input) Defines the maximum accepted value in the range.protected double
boundaryMin
(FeatureCalculationInput<T> input) Defines the minimum accepted value in the range.A human-readable description of the parameterization of the bean.Specifies which feature to calculate the input value.getMax()
Calculates maximally-allowed range boundarygetMin()
Calculates minimally-allowed range boundarydouble
Constant to return if value lies within the rangevoid
Calculates maximally-allowed range boundaryvoid
Calculates minimally-allowed range boundaryvoid
setWithinValue
(double withinValue) Constant to return if value lies within the rangeprotected double
withinRangeValue
(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.RangeCompareBase
calculate, getAboveMaxValue, getBelowMinValue, setAboveMaxValue, setBelowMinValue
Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItem
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, 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
-
CompareWithRangeFeature
public CompareWithRangeFeature()
-
-
Method Details
-
featureToCalcInputValue
Description copied from class:RangeCompareBase
Specifies which feature to calculate the input value.- Specified by:
featureToCalcInputValue
in classRangeCompareBase<T extends FeatureInput>
- Returns:
- the
Feature
used to calculate the input value
-
boundaryMin
Description copied from class:RangeCompareBase
Defines the minimum accepted value in the range.- Specified by:
boundaryMin
in classRangeCompareBase<T extends FeatureInput>
- Parameters:
input
- theFeatureCalculationInput
to use for calculation- Returns:
- the minimum boundary value
- Throws:
FeatureCalculationException
- if the calculation fails
-
boundaryMax
Description copied from class:RangeCompareBase
Defines the maximum accepted value in the range.- Specified by:
boundaryMax
in classRangeCompareBase<T extends FeatureInput>
- Parameters:
input
- theFeatureCalculationInput
to use for calculation- Returns:
- the maximum boundary value
- Throws:
FeatureCalculationException
- if the calculation fails
-
withinRangeValue
protected double withinRangeValue(double valWithinRange, FeatureCalculationInput<T> input) throws FeatureCalculationException Description copied from class:RangeCompareBase
Calculates the value to return if the input is within the range.- Specified by:
withinRangeValue
in classRangeCompareBase<T extends FeatureInput>
- Parameters:
valWithinRange
- the input value that is within the rangeinput
- theFeatureCalculationInput
to use for calculation- Returns:
- the calculated value
- Throws:
FeatureCalculationException
- if the calculation fails
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classRangeCompareBase<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 -
getMin
Calculates minimally-allowed range boundary -
setMin
Calculates minimally-allowed range boundary -
getMax
Calculates maximally-allowed range boundary -
setMax
Calculates maximally-allowed range boundary
-