You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/usage.md
+4-45
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,24 @@ To use the `DividedRectangles` module, start your code with:
5
5
```julia
6
6
using DividedRectangles
7
7
```
8
-
9
8
---
10
9
11
10
## Core Functions
12
11
13
12
### `optimize`
14
13
The `optimize` function is the primary function of the `DividedRectangles` module. It implements the DIRECT algorithm to find the minimum of a given objective function within specified bounds.
15
14
16
-
To use the `optimize` function with a custom mathematical function:
15
+
To use the `optimize` function with a custom objective function::
17
16
18
17
```julia
19
18
using DividedRectangles
20
19
21
20
# Define the objective function
22
-
f(x) =dot([1.0, 2.0, 3.0], x) # Example objective function with coefficients
21
+
f(x) =x[1]^2+ x[2]^2+3*sin(5* x[1]) +2*cos(3* x[2]) # Multivariate example
0 commit comments