This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/math/distribution/Logistic.h
FrankE 0e05f4bef8 started removing KLib related code:
- assertions
- distributions
new helper methods
worked on stairs
worked on grid-walkers
worked on navigation
2016-01-27 20:03:58 +01:00

23 lines
368 B
C++

#ifndef LOGISTIC_H
#define LOGISTIC_H
namespace Distribution {
// https://de.wikipedia.org/wiki/Logistische_Verteilung
template <typename T> class Logistic {
public:
/** alpha = move the center, beta = slope */
static T getCDF(const T x, const T alpha, const T beta) {
return 1 / (1 + std::exp( -((x-alpha)/beta) ) );
}
};
}
#endif // LOGISTIC_H