Skip to content

Commit d773dcd

Browse files
authored
Update algorithm.md - Formatting
1 parent d8491ec commit d773dcd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/src/algorithm.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ After finding the minimum $x^*$ of $g$, the minimum of $f$ is
2121
```
2222
---
2323

24-
1. The figure below shows DIRECT method after 16 iterations on the Branin function (see the test functions section in the appendix). The cells are much denser around the minima of the Branin function because the DIRECT method is designed to increase resolution in promising regions.
24+
- The figure below shows DIRECT method after 16 iterations on the Branin function (see the test functions section in the appendix). The cells are much denser around the minima of the Branin function because the DIRECT method is designed to increase resolution in promising regions.
2525

2626
![page_11](https://github.com/user-attachments/assets/b833bedd-41aa-40c5-a27f-26188a171797)
2727

@@ -47,15 +47,15 @@ f(c^{(i)}) - \ell r^{(i)}
4747
```
4848
---
4949

50-
1. The left plot shows the intervals for the DIRECT method after 5 iterations on the Branin function, see the test functions section in the appendix. The right plot shows the interval objective function values versus their radii, which is useful for identifying intervals to split with further evaluations.
50+
- The left plot shows the intervals for the DIRECT method after 5 iterations on the Branin function, see the test functions section in the appendix. The right plot shows the interval objective function values versus their radii, which is useful for identifying intervals to split with further evaluations.
5151

5252
![page_12](https://github.com/user-attachments/assets/34da1f5e-c983-45cc-8b6c-531184d4b756)
5353

54-
2. The left plot shows the Lipschitz lowerbounds constructed for the DIRECT intervals using the Lipschitz constant = 200, and highlights one interval. The right plot shows how the minimum value for the lowerbound within the highlighted interval is the same as the x-intercept for a line of slope passing through that interval’s $(r, f(c))$ point.
54+
- The left plot shows the Lipschitz lowerbounds constructed for the DIRECT intervals using the Lipschitz constant = 200, and highlights one interval. The right plot shows how the minimum value for the lowerbound within the highlighted interval is the same as the x-intercept for a line of slope passing through that interval’s $(r, f(c))$ point.
5555

5656
![page_13](https://github.com/user-attachments/assets/f023e6b0-ee8a-48fb-a8b6-c1b68d819377)
5757

58-
3. The left plot continues to show the Lipschitz lowerbounds constructed for the DIRECT intervals using the Lipschitz constant = 200, but now highlights the interval containing the lowest value. The right plot shows how the lowest lowerbound for a given Lipschitz constant is the one with the lowest x-intercept in the right-hand plot.
58+
- The left plot continues to show the Lipschitz lowerbounds constructed for the DIRECT intervals using the Lipschitz constant = 200, but now highlights the interval containing the lowest value. The right plot shows how the lowest lowerbound for a given Lipschitz constant is the one with the lowest x-intercept in the right-hand plot.
5959

6060
![page_14](https://github.com/user-attachments/assets/7df39f70-2ef2-4eaa-a5de-54f93d21e653)
6161

@@ -69,7 +69,7 @@ f(c^{(i)}) - \ell r^{(i)}
6969

7070
---
7171

72-
The left plot shows the split intervals identified for this iteration of DIRECT on the Branin function. The right plot shows the lower-right convex hull formed by these split intervals in $(r, f(c))$ space.
72+
- The left plot shows the split intervals identified for this iteration of DIRECT on the Branin function. The right plot shows the lower-right convex hull formed by these split intervals in $(r, f(c))$ space.
7373

7474
![page_15](https://github.com/user-attachments/assets/5142788b-814e-4221-b50f-1746672278df)
7575

@@ -95,7 +95,7 @@ r = \sqrt{\left( \frac{1}{2 \cdot 3^{-d_1}} \right)^2 , \ldots , \left( \frac{1}
9595
---
9696
## Practical Implementations:
9797

98-
1. Struct `DirectRectangle`:
98+
- Struct `DirectRectangle`:
9999

100100
```julia
101101
struct DirectRectangle
@@ -106,7 +106,7 @@ r = \sqrt{\left( \frac{1}{2 \cdot 3^{-d_1}} \right)^2 , \ldots , \left( \frac{1}
106106
end
107107
```
108108

109-
2. `direct` Function:
109+
- `direct` Function:
110110

111111
```julia
112112
function direct(f, a, b, k_max, r_min)
@@ -126,14 +126,14 @@ function direct(f, a, b, k_max, r_min)
126126
return c_best .* (b - a) + a # from unit hypercube
127127
end
128128
```
129-
3. `is_ccw` Function:
129+
- `is_ccw` Function:
130130

131131
```julia
132132
function is_ccw(a, b, c)
133133
return a.r * (b.y - c.y) - a.y * (b.r - c.r) + (b.r * c.y - b.y * c.r) < 1e-6
134134
end
135135
```
136-
4.`get_split_intervals`Function
136+
- `get_split_intervals`Function
137137

138138
```julia
139139
function get_split_intervals(□s, r_min)
@@ -155,7 +155,7 @@ function get_split_intervals(□s, r_min)
155155
return hull
156156
end
157157
```
158-
5. `split_interval` Function:
158+
- `split_interval` Function:
159159

160160
```julia
161161
function split_interval(□, g)

0 commit comments

Comments
 (0)