Skip to content

Commit

Permalink
slight modification, removed useless new shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Mar 28, 2020
1 parent d7cac14 commit de65159
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ First, you need to add the following repository, which is a repository that can
```

Than you can add the dependency on our `aitoa-code` repository into your `dependencies` section.
Here, `0.8.47` is the current version of `aitoa-code`.
Here, `0.8.48` is the current version of `aitoa-code`.
Notice that you may have more dependencies in your `dependencies` section, say on `junit`, but here I just put the one for `aitoa-code` as example.

```xml
<dependencies>
<dependency>
<groupId>com.github.thomasWeise</groupId>
<artifactId>aitoa-code</artifactId>
<version>0.8.47</version>
<version>0.8.48</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>aitoa</groupId>
<artifactId>aitoa-code</artifactId>
<version>0.8.47</version>
<version>0.8.48</version>
<packaging>jar</packaging>
<name>aitoa-code</name>
<description>Example Source Codes from the Book "Introduction to Optimization Algorithms"</description>
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/aitoa/algorithms/EDA.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import aitoa.structure.INullarySearchOperator;
import aitoa.structure.ISpace;
import aitoa.structure.LogFormat;
import aitoa.utils.RandomUtils;

/**
* An estimation of distribution algorithm does not apply search
Expand Down Expand Up @@ -130,7 +129,6 @@ public final void solve(final IBlackBoxProcess<X, Y> process) {
}

for (;;) {// each iteration: update model, sample model
RandomUtils.shuffle(random, P, 0, P.length);
Arrays.sort(P); // sort: best solutions at start
// update model with mu<lambda best solutions
Model.update(IModel.use(P, 0, this.mu));
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/aitoa/algorithms/EDAWithFitness.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import aitoa.structure.INullarySearchOperator;
import aitoa.structure.ISpace;
import aitoa.structure.LogFormat;
import aitoa.utils.RandomUtils;

/**
* An {@linkplain aitoa.algorithms.EDA estimation of distribution
Expand Down Expand Up @@ -132,7 +131,6 @@ public final void solve(final IBlackBoxProcess<X, Y> process) {
}

for (;;) {// each iteration: update model, sample model
RandomUtils.shuffle(random, P, 0, P.length);
this.fitness.assignFitness(P);
Arrays.sort(P); // sort: best solutions at start
// update model with mu<lambda best solutions
Expand Down

0 comments on commit de65159

Please sign in to comment.