Documentation
¶
Index ¶
- func Clamp[T constraints.Ordered](n, min, max T) T
- func Confidence(p float64, n int) float64
- func ConfidenceScore(score, min, max float64, voteCount int) float64
- func ConfidenceVote(upVotes, downVotes int) float64
- func Gompertz(t, a, b, c float64) float64
- func Max[T constraints.Ordered](n ...T) (max T)
- func Min[T constraints.Ordered](n ...T) (min T)
- func Nudge(v, min, max, factor float64, seed int64) float64
- func Sum[N Number](n ...N) (sum N)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clamp ¶
func Clamp[T constraints.Ordered](n, min, max T) T
func Confidence ¶
func ConfidenceScore ¶
func ConfidenceVote ¶
func Gompertz ¶
Gompertz function based on https://en.wikipedia.org/wiki/Gompertz_function
func Max ¶
func Max[T constraints.Ordered](n ...T) (max T)
func Min ¶
func Min[T constraints.Ordered](n ...T) (min T)
Types ¶
type Number ¶
type Number interface {
constraints.Integer | constraints.Float | constraints.Complex
}
Click to show internal directories.
Click to hide internal directories.