Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Conversation

btracey
Copy link
Member

@btracey btracey commented Sep 2, 2016

No description provided.

@btracey
Copy link
Member Author

btracey commented Sep 2, 2016

This is step two of the plan. After this is comments and a real global method.

Copy link
Member

@vladimir-ch vladimir-ch left a comment

Choose a reason for hiding this comment

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

LGTM

global.go Outdated
case NoOperation:
case InitIteration:
panic("optimize: GlobalMethod return InitIteration")
panic("optimize: Method return InitIteration")
Copy link
Member

Choose a reason for hiding this comment

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

... returned ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

guessandcheck.go Outdated
func (g *GuessAndCheck) InitGlobal(dim, tasks int) int {
g.eval = make([]bool, tasks)
g.bestF = math.Inf(1)
g.bestX = make([]float64, dim)
Copy link
Member

Choose a reason for hiding this comment

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

Reuse g.bestX if possible?

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

minimize.go Outdated
// If local is true, gradient convergence is also checked.
func checkConvergence(loc *Location, settings *Settings, local bool) Status {
if local {
if loc.Gradient != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Merge this with if local ?

minimize.go Outdated
}

// checkLimits returns NotTerminated status if the various limits given by
// settings has not been reached. Otherwise it returns a corresponding status.
Copy link
Member

Choose a reason for hiding this comment

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

s/has/have/

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

minimize.go Outdated

// checkLimits returns NotTerminated status if the various limits given by
// settings has not been reached. Otherwise it returns a corresponding status.
// Unlike checkConvergence, checkLimits is called by Local at _every_ iteration.
Copy link
Member

Choose a reason for hiding this comment

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

... is called by Local and Global at every iteration.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@btracey btracey merged commit 9e37f2d into master Oct 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants