Skip to content

Commit

Permalink
Merge pull request #354 from rcurtin/schaffer-n1-dims
Browse files Browse the repository at this point in the history
Fix dimensionality of bounds for uses of SchafferFunctionN1
  • Loading branch information
rcurtin authored Jan 28, 2023
2 parents adf2fc8 + 91df4c5 commit 8194ad9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/optimizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1892,8 +1892,8 @@ Attributes of the optimizer may also be changed via the member methods

```c++
SchafferFunctionN1<arma::mat> SCH;
arma::vec lowerBound("-10 -10");
arma::vec upperBound("10 10");
arma::vec lowerBound("-10");
arma::vec upperBound("10");
DefaultMOEAD opt(300, 300, 1.0, 0.9, 20, 20, 0.5, 2, 1E-10, lowerBound, upperBound);
typedef decltype(SCH.objectiveA) ObjectiveTypeA;
typedef decltype(SCH.objectiveB) ObjectiveTypeB;
Expand Down Expand Up @@ -1954,8 +1954,8 @@ Attributes of the optimizer may also be changed via the member methods
```c++
SchafferFunctionN1<arma::mat> SCH;
arma::vec lowerBound("-1000 -1000");
arma::vec upperBound("1000 1000");
arma::vec lowerBound("-1000");
arma::vec upperBound("1000");
NSGA2 opt(20, 5000, 0.5, 0.5, 1e-3, 1e-6, lowerBound, upperBound);
typedef decltype(SCH.objectiveA) ObjectiveTypeA;
Expand All @@ -1967,7 +1967,7 @@ std::tuple<ObjectiveTypeA, ObjectiveTypeB> objectives = SCH.GetObjectives();
// obj will contain the minimum sum of objectiveA and objectiveB found on the best front.
double obj = opt.Optimize(objectives, coords);
// Now obtain the best front.
arma::cube bestFront = opt.Front();
arma::cube bestFront = opt.ParetoFront();
```

</details>
Expand Down

0 comments on commit 8194ad9

Please sign in to comment.