29#ifndef __logistic_hpp__
30#define __logistic_hpp__
56template <
typename floatT>
61 return -log( 1.0 / x - 1 ) / thalf;
80template <
typename floatT>
81floatT
logistic( floatT t, floatT t0 = 0, floatT a = 1 )
83 return 1.0 / ( 1.0 + exp( -a * ( t - t0 ) ) );
floatT logistic(floatT t, floatT t0=0, floatT a=1)
Return the value of the logistic function.
floatT logistic_param(floatT x, floatT thalf)
Return the logistic function parameter for a specified rise time.