T
- the input-type (even though it is irrelevant and ignored, but it keeps the class
hierarchy consistent).public class Constant<T extends FeatureInput> extends FeatureGeneric<T>
Constructor and Description |
---|
Constant() |
Constant(double value)
Constructor with a particular value.
|
Constant(String customName,
double value)
Constructor with a particular value and a custom-name.
|
Modifier and Type | Method and Description |
---|---|
double |
calculate(FeatureCalculationInput<T> input)
Calculates a value for some input.
|
String |
describeParameters()
A human-readable description of the parameterization of the bean.
|
String |
descriptionLong()
A long human-readable description of the feature and some or all of its parameterization.
|
double |
getValue()
The constant value.
|
void |
setValue(double value)
The constant value.
|
inputType
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
public Constant(double value)
value
- the value.public Constant(String customName, double value)
customName
- a custom-name for feature.value
- the value.public Constant()
public double calculate(FeatureCalculationInput<T> input)
Feature
calculate
in class Feature<T extends FeatureInput>
input
- the input to the calculation.public String describeParameters()
Feature
describeParameters
in class Feature<T extends FeatureInput>
public String descriptionLong()
Feature
This can be overwritten to create an alternative description for features. By default
string returned by Feature.describeBean()
is used.
descriptionLong
in class Feature<T extends FeatureInput>
public double getValue()
public void setValue(double value)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.