Skip to content

Commit 96aa3c6

Browse files
committed
expand docstring
1 parent 1330a66 commit 96aa3c6

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

src/interface/decompositions.jl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,21 @@ until convergence up to tolerance `tol`.
307307
"""
308308
DefaultAlgorithm(; kwargs...)
309309
310-
Algorithm sentinel that resolves to the default algorithm for a given function and input
311-
type at call time. Any keyword arguments stored in the instance are forwarded at runtime
312-
to [`select_algorithm`](@ref).
310+
Algorithm sentinel that resolves to the algorithm section procedures for a given function and input type at call time.
311+
This provides a unified approach for package developers to store keyword argument and direct algorithm inputs.
312+
Any keyword arguments stored in the instance are forwarded at runtime to [`select_algorithm`](@ref).
313+
314+
For example, the following calls are equivalent:
315+
316+
```julia
317+
A = rand(3, 3)
318+
319+
# specifying keyword arguments
320+
Q, R = qr_compact(A; positive = true)
321+
322+
# wrapping keyword arguments in DefaultAlgorithm
323+
alg = DefaultAlgorithm(; positive = true)
324+
Q, R = qr_compact(A; alg)
313325
"""
314326
@algdef DefaultAlgorithm
315327

0 commit comments

Comments
 (0)