Skip to content

Commit aeb46b0

Browse files
fixup! refactor: add new *_symbols methods, corresponding singletons, update tests
1 parent 0b925c0 commit aeb46b0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/SymbolicIndexingInterface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ include("trait.jl")
55

66
export is_variable, variable_index, variable_symbols, is_parameter, parameter_index,
77
parameter_symbols, is_independent_variable, independent_variable_symbols, is_observed,
8-
observed, is_time_dependent, constant_structure, symbolic_container, all_solvable_symbols,
9-
all_symbols
8+
observed, is_time_dependent, constant_structure, symbolic_container, all_variable_symbols,
9+
all_symbols, solvedvariables, allvariables
1010
include("interface.jl")
1111

1212
export SymbolCache

src/interface.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ number of variables or parameters over time.
116116
constant_structure(sys) = constant_structure(symbolic_container(sys))
117117

118118
"""
119-
all_variables(sys)
119+
all_variable_symbols(sys)
120120
121-
Return a vector of pairs, where the first element of each pair is a symbolic variable
122-
and the second is its initial value. This includes observed quantities.
121+
Return a vector of variable symbols in the system, including observed quantities.
123122
124123
For types that implement `Base.getindex` with symbolic indices using this interface,
125124
The shorthand `sys[allvariables]` can be used as shorthand for
@@ -145,7 +144,7 @@ This singleton is used as a shortcut to allow indexing all solution variables
145144
[`ScalarSymbolic`](@ref). See: [`variable_symbols`](@ref).
146145
"""
147146
const solvedvariables = SolvedVariables()
148-
symbolic_type(::Type{AllVariables}) = ScalarSymbolic()
147+
symbolic_type(::Type{SolvedVariables}) = ScalarSymbolic()
149148

150149
struct AllVariables end
151150

0 commit comments

Comments
 (0)