@@ -54,21 +54,25 @@ function _show_alg(io::IO, alg::Algorithm)
5454end
5555
5656@doc """
57- MatrixAlgebraKit.select_algorithm(f, A, alg=nothing; kwargs...)
57+ MatrixAlgebraKit.select_algorithm(f, A, alg::AbstractAlgorithm)
58+ MatrixAlgebraKit.select_algorithm(f, A, alg::Symbol; kwargs...)
59+ MatrixAlgebraKit.select_algorithm(f, A, alg::Type; kwargs...)
60+ MatrixAlgebraKit.select_algorithm(f, A; kwargs...)
61+ MatrixAlgebraKit.select_algorithm(f, A, (; kwargs...))
5862
5963Decide on an algorithm to use for implementing the function `f` on inputs of type `A`.
6064
61- If `alg` is `nothing` (the default value), an algorithm will be selected automatically
62- with [`MatrixAlgebraKit.default_algorithm`](@ref) and the keyword arguments will be passed
63- to the algorithm constructor.
65+ If `alg` is an `AbstractAlgorithm` instance, it will be returned as-is.
6466
65- If `alg` is a `NamedTuple`, an algorithm will be selected automatically
66- with [`default_algorithm`](@ref) and `alg` will be passed to the algorithm
67- as keyword arguments. In that case, keyword arguments can't be passed
68- to `MatrixAlgebraKit.select_algorithm`
67+ If `alg` is a `Symbol` or a `Type` of algorithm, the return value is obtained
68+ by calling the corresponding algorithm constructor;
69+ keyword arguments in `kwargs` are passed along to this constructor.
6970
70- If `alg` is an `AbstractAlgorithm`, it will be returned as-is. In that case, keyword arguments
71- can't be passed to `MatrixAlgebraKit.select_algorithm`.
71+ If `alg` is not specified (or `nothing`), an algorithm will be selected
72+ automatically with [`MatrixAlgebraKit.default_algorithm`](@ref) and
73+ the keyword arguments in `kwargs` will be passed to the algorithm constructor.
74+ Finally, the same behavior is obtained when the keyword arguments are
75+ passed as the third positional argument in the form of a `NamedTuple`.
7276"""
7377function select_algorithm end
7478
0 commit comments