Skip to content

Commit

Permalink
exponential scale one-way search
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Jul 18, 2021
1 parent 2b7fc75 commit e151879
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/strategy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function find_weight_scale!(wc::WC; initialscale=0, density=0.3, maxiter=5, tole
fonts = getfonts(wc)
sc0 = 0.
tg0 = 0.
oneway_count = 1
while true
step = step + 1
if step > maxiter
Expand Down Expand Up @@ -117,11 +118,13 @@ function find_weight_scale!(wc::WC; initialscale=0, density=0.3, maxiter=5, tole
sc2 = sc2_
# @show best_scale_L best_scale_H
elseif isfinite(best_tar_H)
sc2_ = sc1 * 0.95
sc2_ = sc1 * (0.95^oneway_count)
oneway_count += 1
println("one-way search takes effect: scale $sc2 -> $sc2_")
sc2 = sc2_
elseif isfinite(best_tar_L)
sc2_ = sc1 / 0.95
sc2_ = sc1 / (0.95^oneway_count)
oneway_count += 1
println("one-way search takes effect: scale $sc2 -> $sc2_")
sc2 = sc2_
else
Expand Down

2 comments on commit e151879

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/41102

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.2 -m "<description of version>" e151879d55f9f0672f7fde2fa71dca1351700f1c
git push origin v0.7.2

Please sign in to comment.