Content-Length: 312807 | pFad | http://github.com/wildart/Evolutionary.jl/commit/780cbb090791caf31abf41264100d76268e4e280

24 added `show` method for all algos · wildart/Evolutionary.jl@780cbb0 · GitHub
Skip to content

Commit

Permalink
added show method for all algos
Browse files Browse the repository at this point in the history
  • Loading branch information
wildart committed Mar 18, 2021
1 parent eff5e0a commit 780cbb0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmaes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ end
population_size(method::CMAES) = method.μ
default_options(method::CMAES) = (iterations=1500, abstol=1e-15)
summary(m::CMAES) = "($(m.μ),$(m.λ))-CMA-ES"
show(io::IO,m::CMAES) = print(io, summary(m))

mutable struct CMAESState{T,TI} <: AbstractOptimizerState
N::Int
Expand Down
1 change: 1 addition & 0 deletions src/de.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ end
population_size(method::DE) = method.populationSize
default_options(method::DE) = (abstol=1e-10,)
summary(m::DE) = "DE/$(m.selection)/$(m.n)/$(m.recombination)"
show(io::IO,m::DE) = print(io, summary(m))

mutable struct DEState{T,IT} <: AbstractOptimizerState
N::Int
Expand Down
1 change: 1 addition & 0 deletions src/es.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ end
population_size(method::ES) = method.μ
default_options(method::ES) = (iterations=1000, abstol=1e-10)
summary(m::ES) = "($(m.μ)/$(m.ρ)$(m.selection == :plus ? '+' : ',')$(m.λ))-ES"
show(io::IO,m::ES) = print(io, summary(m))

mutable struct ESState{T,IT,ST} <: AbstractOptimizerState
N::Int
Expand Down
1 change: 1 addition & 0 deletions src/ga.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
population_size(method::GA) = method.populationSize
default_options(method::GA) = (iterations=1000, abstol=1e-15)
summary(m::GA) = "GA[P=$(m.populationSize),x=$(m.crossoverRate),μ=$(m.mutationRate),ɛ=$(m.ɛ)]"
show(io::IO,m::GA) = print(io, summary(m))

mutable struct GAState{T,IT} <: AbstractOptimizerState
N::Int
Expand Down
1 change: 1 addition & 0 deletions src/gp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function summary(m::TreeGP)
par = join(terminals(m),",")
"TreeGP[P=$(m.populationSize),Parameter[$(par)],$(keys(m.functions))]"
end
show(io::IO,m::TreeGP) = print(io, summary(m))

"""
randterm(t::TreeGP)
Expand Down

0 comments on commit 780cbb0

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/wildart/Evolutionary.jl/commit/780cbb090791caf31abf41264100d76268e4e280

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy