Skip to content

Commit

Permalink
lll
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Oct 15, 2019
1 parent e4ac2f5 commit b365932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion diff_evo.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ type DiffEvo struct {

// NewDiffEvo instantiates and returns a DiffEvo instance after having checked
// for input errors.
func NewDiffEvo(nAgents, nSteps uint, min, max, cRate, dWeight float64, parallel bool, rng *rand.Rand) (*DiffEvo, error) {
func NewDiffEvo(nAgents, nSteps uint, min, max, cRate, dWeight float64,
parallel bool, rng *rand.Rand) (*DiffEvo, error) {
// Check inputs
if nAgents < 4 {
return nil, errors.New("nAgents should be at least 4")
Expand Down
3 changes: 2 additions & 1 deletion models.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ var (
// applied to generate two offsprings. The selection and crossover process is
// repeated until n offsprings have been generated. If n is uneven then the
// second offspring of the last crossover is discarded.
func generateOffsprings(n uint, indis Individuals, sel Selector, crossRate float64, rng *rand.Rand) (Individuals, error) {
func generateOffsprings(n uint, indis Individuals, sel Selector, crossRate float64,
rng *rand.Rand) (Individuals, error) {
var (
offsprings = make(Individuals, n)
i = 0
Expand Down

0 comments on commit b365932

Please sign in to comment.