Skip to content

Commit

Permalink
Add note about mixing vector types
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolaru authored Nov 16, 2024
1 parent e2389c9 commit 661ab19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ julia> roots(h, SVector(X, X))
Root(Interval{Float64}[[1.999999, 2.00001]_com_NG, [3.999999, 4.00001]_com_NG], :unique)
```

!!! warning

Inputs and outputs must have the same vector type. In particular, if the function return a `SVector`, the initial search region should be a `SVector` as well (and if a Jacobian is given, it should return a `SMatrix`).
Mixing vector types may either error or convert everything to `Vector` and ruin performances.

## Stationary points

Stationary points of a function $f:\mathbb{R}^n \to \mathbb{R}$ may be found as zeros of the gradient of $f$.
Expand Down

1 comment on commit 661ab19

@Datseris
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please clarify this more?

If the function return a SVector, the initial search region should be a SVector as well (and if a Jacobian is given, it should return a SMatrix)

Do you mean that the "interval box" should be an SVector of Interval instead of a Vector of Interval?

Please sign in to comment.