Skip to content

Commit 91df4c5

Browse files
committed
Fix dimensionality of bounds for uses of SchafferFunctionN1.
1 parent adf2fc8 commit 91df4c5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/optimizers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,8 +1892,8 @@ Attributes of the optimizer may also be changed via the member methods
18921892

18931893
```c++
18941894
SchafferFunctionN1<arma::mat> SCH;
1895-
arma::vec lowerBound("-10 -10");
1896-
arma::vec upperBound("10 10");
1895+
arma::vec lowerBound("-10");
1896+
arma::vec upperBound("10");
18971897
DefaultMOEAD opt(300, 300, 1.0, 0.9, 20, 20, 0.5, 2, 1E-10, lowerBound, upperBound);
18981898
typedef decltype(SCH.objectiveA) ObjectiveTypeA;
18991899
typedef decltype(SCH.objectiveB) ObjectiveTypeB;
@@ -1954,8 +1954,8 @@ Attributes of the optimizer may also be changed via the member methods
19541954
19551955
```c++
19561956
SchafferFunctionN1<arma::mat> SCH;
1957-
arma::vec lowerBound("-1000 -1000");
1958-
arma::vec upperBound("1000 1000");
1957+
arma::vec lowerBound("-1000");
1958+
arma::vec upperBound("1000");
19591959
NSGA2 opt(20, 5000, 0.5, 0.5, 1e-3, 1e-6, lowerBound, upperBound);
19601960
19611961
typedef decltype(SCH.objectiveA) ObjectiveTypeA;
@@ -1967,7 +1967,7 @@ std::tuple<ObjectiveTypeA, ObjectiveTypeB> objectives = SCH.GetObjectives();
19671967
// obj will contain the minimum sum of objectiveA and objectiveB found on the best front.
19681968
double obj = opt.Optimize(objectives, coords);
19691969
// Now obtain the best front.
1970-
arma::cube bestFront = opt.Front();
1970+
arma::cube bestFront = opt.ParetoFront();
19711971
```
19721972

19731973
</details>

0 commit comments

Comments
 (0)