Skip to content

Commit d121b0d

Browse files
docs: update documentation for symbolic_container
1 parent 90cc7c9 commit d121b0d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/src/api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
### Mandatory methods
66

77
```@docs
8-
symbolic_container
98
is_variable
109
variable_index
1110
variable_symbols
@@ -26,6 +25,10 @@ allvariables
2625

2726
### Optional Methods
2827

28+
```@docs
29+
symbolic_container
30+
```
31+
2932
#### Observed equation handling
3033

3134
```@docs

src/index_provider_interface.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Using `indp`, return an object that implements the index provider interface. In
55
itself implements the interface, `indp` can be returned as-is. All index provider interface
66
methods fall back to calling the same method on `symbolic_container(indp)`, so this may be
77
used for trivial implementations of the interface that forward all calls to another object.
8+
9+
Note that this method is optional. Thus the correct method to check for a fallback is:
10+
```julia
11+
hasmethod(symbolic_container, Tuple{typeof(indp)}) && symbolic_container(indp) != indp
12+
```
813
"""
914
function symbolic_container end
1015

0 commit comments

Comments
 (0)