Default sets

There are some default sets available if the user does not want to understand how to create new constants and functions.

Const sets

GP_NLS.defaultFunctionSetConstant

Default functions set

Func((args...) -> args[1] .+ args[2], 2, "+"),
Func((args...) -> args[1] .- args[2], 2, "-"),
Func((args...) -> args[1] .* args[2], 2, "*"),
Func((args...) -> args[1] ./ args[2], 2, "/"), # Notice that it is not protected division!

Func((args...) -> args[1].^2, 1, "squared"),
Func((args...) -> sqrt.(args[1]), 1, "sqrt"),
Func((args...) -> exp.(args[1]), 1, "exp"),
Func((args...) -> log.(args[1]), 1, "log"),

Func((args...) -> sin.(args[1]), 1, "sin"),
Func((args...) -> cos.(args[1]), 1, "cos"),
Func((args...) -> args[1].^2, 1, "sqrt.abs"),
source