Module tg4_mixer::functions

source ·

Structs

Algebraic sigmoid. f(x) = x / sqrt(1 + x^2). Fitting the sigmoid-like function from the PoE whitepaper. p and s are just equivalent to the Sigmoid parameters. a is an adjustment / fitting parameter (1 <= a < 5), to better match the two curves differing slopes.
This takes a geometric mean of stake and engagement points using integer math
Sigmoid function. f(x) = 1 / (1 + e^-x). Fitting the sigmoid-like function from the PoE white-paper: f(x) = r_max * (2 / (1 + e ^(-s * x^p) - 1)
Sigmoid function. f(x) = 1 / (1 + e^-x). Fitting the sigmoid-like to a 1/2 (sqrt) exponent. f(x) = r_max * (2 / (1 + e ^(-s * sqrt(x)) - 1)

Traits

This defines the functions we can use for proof of engagement points.

Functions