pub struct Sigmoid {
    pub max_points: Decimal,
    pub p: Decimal,
    pub s: Decimal,
    /* private fields */
}
Expand description

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)

Fields§

§max_points: Decimal§p: Decimal§s: Decimal

Implementations§

Trait Implementations§

Returns the points based on the amount of stake and engagement points. f(x) from the README.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.