Skip to content

Commit 1cd210d

Browse files
Update README.md
1 parent 5edf88f commit 1cd210d

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@ which allows for solvers to be able to handle custom user types in an efficient
1515

1616
## Core Interface Definitions
1717

18+
### `isscimlstructure` Definition
19+
20+
```julia
21+
isscimlstructure(p)::Bool
22+
```
23+
24+
Returns whether the object satisfies the SciMLStructure interface. Defaults to `false` and types
25+
are required to opt-into the interface.
26+
1827
### `canonicalize` Definition
1928

2029
```julia
21-
cononicalize(::AbstractPortion, p) -> values::AbstractArray, repack, aliases::Bool
22-
repack(::AbstractArray) -> (Float64[], Int[], Vector{Float64}[])
30+
cononicalize(::AbstractPortion, p::T1) -> values::T2, repack, aliases::Bool
31+
repack(new_values::T2) -> p::T2 # with values replaced with new_values
2332
```
2433

2534
### Portion Defintions
@@ -32,14 +41,17 @@ are defined are:
3241
* Tunable: the tunable values/parameters, i.e. the values of the structure which are supposed to be considered
3342
non-constant when used in the context of an inverse problem solve. For example, this is the set of
3443
parameters to be optimized during a parameter estimation of an ODE.
44+
* Tunable parameters are expected to return an `AbstractVector` of unitless values.
3545
* Constants: the values which are to be considered constant by the solver, i.e. values which are not estimated
3646
in an inverse problem and which are unchanged in any operation by the user as part of the solver's usage.
3747
* Caches: the stored cache values of the struct, i.e. the values of the structure which are used as intermediates
3848
within other computations in order to avoid extra allocations.
3949
* Discrete: the discrete portions of the state captured inside of the structure. For example, discrete values
4050
stored outside of the `u` in the parameters to be modified in the callbacks of an ODE.
4151

42-
## Core Assumptions of the Interface
52+
## Definitions for Base Objects
4353

44-
* `canonicalize` returns an `AbstractVector`
45-
* `canonicalize` returns the unitless values
54+
* `Vector`: returns an aliased version of itself as `Tunable`, and an empty vector matching type for `Constants`,
55+
`Caches`, and `Discrete`.
56+
* `Array`: returns the `vec(p)` aliased version of itself as `Tunable`, and an empty vector matching type for `Constants`,
57+
`Caches`, and `Discrete`.

0 commit comments

Comments
 (0)