public class SatisfactionCurve
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
SatisfactionCurve()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static double |
acceleratingSatisfaction(double value,
double minValue,
double maxValue,
double endSlope)
Generate a satisfaction curve which accelerates and ends with the specified slope
|
static double |
deceleratingSatisfaction(double value,
double minValue,
double maxValue,
double startSlope)
Generate a satisfaction curve which decelerates and begins with the specified slope
|
static double |
exponentialSatisfaction(double value,
double tolerance)
Generate the exponential satisfaction for a given value and tolerance
|
static double |
inverseRisingSatisfaction(double value,
double tolerance)
Generate a satisfaction based on an inverse function 1 - a / ( a + |x| )
|
static double |
inverseSatisfaction(double value,
double tolerance)
Generate a satisfaction based on an inverse function a / ( a + |x| )
|
static double |
inverseSquareRisingSatisfaction(double value,
double tolerance)
Generate a satisfaction based on an inverse square function 1 - a / ( a + x^2 )
|
static double |
inverseSquareSatisfaction(double value,
double tolerance)
Generate a satisfaction based on an inverse square function a / ( a + x^2 )
|
static double |
linearFallingSatisfaction(double value,
double minValue,
double maxValue)
Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
|
static double |
linearRisingSatisfaction(double value,
double minValue,
double maxValue)
Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
|
static double |
sCurveSatisfactionWithCenterAndSlope(double value,
double center,
double slope)
Generate a satisfaction based on an S-Curve that extends from negative to positive infinity
satisfaction = 1/2 + a ( x - x0 ) / ( 1 + 2a|x - x0| )
|
public static double exponentialSatisfaction(double value, double tolerance)
value
- the value to testtolerance
- the tolerance corresponding to 90% satisfactionpublic static double inverseSatisfaction(double value, double tolerance)
value
- the value to testtolerance
- the tolerance corresponding to 90% satisfactionpublic static double inverseRisingSatisfaction(double value, double tolerance)
value
- the value to testtolerance
- the tolerance corresponding to 90% satisfactionpublic static double inverseSquareSatisfaction(double value, double tolerance)
value
- the value to testtolerance
- the tolerance corresponding to 90% satisfactionpublic static double inverseSquareRisingSatisfaction(double value, double tolerance)
value
- the value to testtolerance
- the tolerance corresponding to 90% satisfactionpublic static double sCurveSatisfactionWithCenterAndSlope(double value, double center, double slope)
value
- the value to testcenter
- the center value of the satisfaction curveslope
- the slope of the satisfaction curve at the centerpublic static double linearRisingSatisfaction(double value, double minValue, double maxValue)
value
- the value to testminValue
- the minimum valuemaxValue
- the maximum valuepublic static double linearFallingSatisfaction(double value, double minValue, double maxValue)
value
- the value to testminValue
- the minimum valuemaxValue
- the maximum valuepublic static double acceleratingSatisfaction(double value, double minValue, double maxValue, double endSlope)
value
- the value to testminValue
- the minimum valuemaxValue
- the maximum valueendSlope
- the slope at the end pointpublic static double deceleratingSatisfaction(double value, double minValue, double maxValue, double startSlope)
value
- the value to testminValue
- the minimum valuemaxValue
- the maximum valuestartSlope
- the slope at the start point