Skip to content

Examples in Docs should use the methods defined in the package #39

@navidcy

Description

@navidcy

Currently, the one example in the docs redefines a method that already exists in the package:

function Ackley(x::Vector{Float64})::Float64
n = length(x)
a = 20.0
b = 0.2
c = 2 * π
sum1 = sum(xi^2 for xi in x)
sum2 = sum(cos(c * xi) for xi in x)
term1 = -a * exp(-b * sqrt(sum1 / n))
term2 = -exp(sum2 / n)
return term1 + term2 + a + exp(1)
end

Why not use the package-defined method for the Ackley function, i.e.,

This way the example will showcase how other package-defined methods can be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions