-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b23cdcc
commit 14f84bb
Showing
17 changed files
with
266 additions
and
705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
export parameters, are_valid_parameters | ||
|
||
""" | ||
named_tuple = parameters(solver) | ||
named_tuple = parameters(SolverType) | ||
named_tuple = parameters(SolverType{T}) | ||
Return the parameters of a `solver`, or of the type `SolverType`. | ||
You can specify the type `T` of the `SolverType`. | ||
The returned structure is a nested NamedTuple. | ||
Each key of `named_tuple` is the name of a parameter, and its value is a NamedTuple containing | ||
- `default`: The default value of the parameter. | ||
- `type`: The type of the parameter, such as `Int`, `Float64`, `T`, etc. | ||
and possibly other values depending on the `type`. | ||
Some possibilies are: | ||
- `scale`: How to explore the domain | ||
- `:linear`: A continuous value within a range | ||
- `:log`: A positive continuous value that should be explored logarithmically (like 10⁻², 10⁻¹, 1, 10). | ||
- `min`: Minimum value. | ||
- `max`: Maximum value. | ||
Solvers should define | ||
SolverCore.parameters(::Type{Solver{T}}) where T | ||
""" | ||
function parameters end | ||
|
||
parameters(::Type{S}) where S <: AbstractSolver = parameters(S{Float64}) | ||
parameters(::S) where S <: AbstractSolver = parameters(S) | ||
|
||
""" | ||
are_valid_parameters(solver, args...) | ||
Return whether the parameters given in `args` are valid for `solver`. | ||
The order of the parameters must be the same as in `parameters(solver)`. | ||
Solvers should define | ||
SolverCore.are_valid_parameters(::Type{Solver{T}}, arg1, arg2, ...) where T | ||
""" | ||
function are_valid_parameters end | ||
are_valid_parameters(::Type{S}, args...) where S <: AbstractSolver = are_valid_parameters(S{Float64}, args...) | ||
are_valid_parameters(::S, args...) where S <: AbstractSolver = are_valid_parameters(S, args...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.