@@ -9,7 +9,7 @@ as `BasicSymbolic`. A `BasicSymbolic` is considered immutable. Mutating its fiel
99behavior.
1010
1111In SymbolicUtils v3, the type ` T ` in ` BasicSymbolic{T} ` was the type represented by the symbolic
12- variable. In other words, ` T ` was the [ ` symtype ` ] ( @ref ) of the variable.
12+ variable. In other words, ` T ` was the [ ` SymbolicUtils. symtype` ] ( @ref ) of the variable.
1313
1414In SymbolicUtils v4, the ` symtype ` is not stored in the type, and is instead a field of the
1515struct. This allows for greatly increased type-stability. The type ` T ` in ` BasicSymbolic{T} `
@@ -26,6 +26,7 @@ A given expression must be pure in its `vartype`. In other words, no operation s
2626of different ` vartype ` s.
2727
2828!!! warning "A short note on (im-)mutability"
29+
2930 While ` ismutabletype(BasicSymbolic) ` returns ` true ` , symbolic types are IMMUTABLE.
3031 Any mutation is undefined behavior and can lead to very confusing and hard-to-debug issues.
3132 This includes internal mutation, such as mutating ` AddMul.dict ` . The arrays returned from
@@ -108,10 +109,10 @@ variant. This variant can be constructed using `Const{T}(val)` or `BSImpl.Const{
108109where ` T ` is the appropriate ` vartype ` .
109110
110111The ` Const ` constructors have an additional special behavior. If given an array of symbolics
111- (or array of array of ... symbolics), it will return a ` Term ` (see below) with ` hvncat ` as
112- the operation. This allows standard symbolic operations (such as [ ` substitute ` ] ( @ref ) ) to
113- work on arrays of symbolics without excessive special-case handling and improved
114- type-stability.
112+ (or array of array of ... symbolics), it will return a ` Term ` (see below) with
113+ [ ` SymbolicUtils.array_literal ` ] ( @ref ) as the operation. This allows standard symbolic
114+ operations (such as [ ` substitute ` ] ( @ref ) ) to work on arrays of symbolics without excessive
115+ special-case handling and improved type-stability.
115116
116117``` julia
117118struct Sym
@@ -294,6 +295,7 @@ range of indices over which they should iterate, in case such a range is explici
294295provided.
295296
296297!!! note
298+
297299 The common global index variable is printed as ` _1 ` , ` _2 ` , ... in arrayops. It is not
298300 a valid symbolic variable outside of an ` ArrayOp ` 's ` expr ` .
299301
@@ -336,8 +338,8 @@ to Base-like behavior:
336338 doing so requires the function(s) passed to ` map ` and ` mapreduce ` instead of their types
337339 or shapes.
338340- Since ` ndims ` information is not present in the type, ` eachindex ` , ` iterate ` , ` size ` ,
339- ` axes ` , ` ndims ` , ` collect ` are type-unstable. [ ` safe_eachindex ` ] ( @ref ) is useful as
340- a type-stable iteration alternative.
341+ ` axes ` , ` ndims ` , ` collect ` are type-unstable. [ ` SymbolicUtils.stable_eachindex ` ] ( @ref ) is
342+ useful as a type-stable iteration alternative.
341343- ` ifelse ` requires that both the true and false cases have identical shape.
342344- Symbolic arrays _ only_ support cartesian indexing. For example, given ` @syms x[1:3, 1:3] `
343345 accessing ` x[4] ` is invalid and ` x[1, 2] ` should be used. Valid indices are
@@ -385,7 +387,7 @@ words,
385387Here, ` f1(x) ` is considered a symbolic function ` f1 ` called with the argument ` x ` and
386388` f2(x) ` is considered a dependent variable that depends on ` x ` . The utilities
387389[ ` SymbolicUtils.is_function_symbolic ` ] ( @ref ) , [ ` SymbolicUtils.is_function_symtype ` ] ( @ref ) ,
388- [ ` symbolicUtils .is_called_function_symbolic` ] ( @ref ) can be used to differentiate between
390+ [ ` SymbolicUtils .is_called_function_symbolic` ] ( @ref ) can be used to differentiate between
389391these cases.
390392
391393## API
@@ -409,6 +411,7 @@ unwrap_const
409411### Inner constructors
410412
411413``` @docs
414+ SymbolicUtils.array_literal
412415SymbolicUtils.BSImpl.Const
413416SymbolicUtils.BSImpl.Sym
414417SymbolicUtils.BSImpl.Term
@@ -457,9 +460,9 @@ SymbolicUtils.promote_shape
457460### Symbolic array utilities
458461
459462``` @docs
460- SymbolicUtils.safe_eachindex
461- SymbolicUtils.SafeIndices
462- SymbolicUtils.SafeIndex
463+ SymbolicUtils.stable_eachindex
464+ SymbolicUtils.StableIndices
465+ SymbolicUtils.StableIndex
463466BS
464467```
465468
0 commit comments