Esempio n. 1
0
    public void should_correctly_calculate_logistic_curve_value(float slope, float xShift, float yShift, float verticalSize, float inputValue, float expectedValue)
    {
        var curve       = new LogisticCurveFunction(slope, xShift, yShift, verticalSize);
        var actualValue = curve.Plot(inputValue);

        Assert.Equal(expectedValue.ToString("F"), actualValue.ToString("F"));
    }
Esempio n. 2
0
 public static LogisticCurveFunction Alter(this LogisticCurveFunction curve, float?slope = null, float?xShift = null, float?yShift = null, float?verticalSize = null)
 {
     return(new LogisticCurveFunction(
                slope.HasValue ? slope.Value : curve.Slope,
                xShift.HasValue ? xShift.Value : curve.XShift,
                yShift.HasValue ? yShift.Value : curve.YShift,
                verticalSize.HasValue ? verticalSize.Value : curve.VerticalSize
                ));
 }