cec2020: add asymptotic func
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
071cb75853
commit
12f0aecd5a
@ -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)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user