Class Range<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
- Type Parameters:
T- the type ofFeatureInputthis feature operates on
Calculates the statistical range between two feature values, with optional weighting.
The range is calculated as the absolute difference between two feature values. Different weights can be applied depending on which value is greater.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculate(FeatureCalculationInput<T> input) Calculates a value for some input.A long human-readable description of the feature and some or all of its parameterization.doubleWeight applied when the first item's value is greater than the second.doubleWeight applied when the second item's value is greater than the first.voidsetWeightItem1Greater(double weightItem1Greater) Weight applied when the first item's value is greater than the second.voidsetWeightItem2Greater(double weightItem2Greater) Weight applied when the second item's value is greater than the first.Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureBinary
getItem1, getItem2, inputType, setItem1, setItem2Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, 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
-
Range
public Range()
-
-
Method Details
-
calculate
Description copied from class:FeatureCalculates a value for some input.- Specified by:
calculatein classFeature<T extends FeatureInput>- Parameters:
input- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException- if the calculation cannot successfully complete.
-
descriptionLong
Description copied from class:FeatureA long human-readable description of the feature and some or all of its parameterization.This can be overwritten to create an alternative description for features. By default string returned by
Feature.describeBean()is used.- Overrides:
descriptionLongin classFeature<T extends FeatureInput>- Returns:
- the description.
-
getWeightItem1Greater
public double getWeightItem1Greater()Weight applied when the first item's value is greater than the second. Default value is 1.0. -
setWeightItem1Greater
public void setWeightItem1Greater(double weightItem1Greater) Weight applied when the first item's value is greater than the second. Default value is 1.0. -
getWeightItem2Greater
public double getWeightItem2Greater()Weight applied when the second item's value is greater than the first. Default value is 1.0. -
setWeightItem2Greater
public void setWeightItem2Greater(double weightItem2Greater) Weight applied when the second item's value is greater than the first. Default value is 1.0.
-