cec2020: add asymptotic func
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-02-04 00:50:13 +01:00
parent 071cb75853
commit 12f0aecd5a
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -98,3 +98,17 @@ func ShiftRotate(x []float64, os []float64, mr []float64, shiftRate float64, shi
} }
} }
} }
// Asy is the asymptotic function.
func Asy(x []float64, beta float64) {
nx := len(x)
for i := range x {
if x[i] > 0 {
fi := float64(i)
fnx := float64(nx)
x[i] = math.Pow(x[i], 1+((beta*fi)/(fnx-1)*math.Pow(x[i], 0.5)))
}
}
}