File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,10 @@ variant. This variant can be constructed using `Const{T}(val)` or `BSImpl.Const{
108108where ` T ` is the appropriate ` vartype ` .
109109
110110The ` 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 [ ` array_literal ` ] ( @ref )
112- as 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.
111+ (or array of array of ... symbolics), it will return a ` Term ` (see below) with
112+ [ ` SymbolicUtils.array_literal ` ] ( @ref ) as the operation. This allows standard symbolic
113+ operations (such as [ ` substitute ` ] ( @ref ) ) to work on arrays of symbolics without excessive
114+ special-case handling and improved type-stability.
115115
116116``` julia
117117struct Sym
Original file line number Diff line number Diff line change @@ -1484,6 +1484,15 @@ function _is_tuple_of_symbolics(O::Tuple)
14841484end
14851485_is_tuple_of_symbolics (O) = false
14861486
1487+ """
1488+ $TYPEDSIGNATURES
1489+
1490+ Utility function used as the operation of expressions representing an array of symbolic values.
1491+ See [`SymbolicUtils.BSImpl.Const`](@ref) for more details.
1492+
1493+ The first argument `sz` is the `size` of the represented array. `args...` is `prod(sz)`
1494+ elements representing the elements of the array in column-major order.
1495+ """
14871496array_literal (sz:: NTuple{N, Int} , args... ) where {N} = reshape (Base. vect (args... ), sz)
14881497
14891498"""
@@ -1502,7 +1511,8 @@ arrays/tuples of symbolics to symbolic expressions.
15021511This is the low-level constructor for constant expressions. It handles several special cases:
150315121. If `val` is already a `BasicSymbolic{T}`, returns it unchanged
150415132. If `val` is a `BasicSymbolic` of a different variant type, throws an error
1505- 3. If `val` is an array containing symbolic elements, creates a `Term` with [`array_literal`](@ref) operation
1514+ 3. If `val` is an array containing symbolic elements, creates a `Term` with
1515+ [`SymbolicUtils.array_literal`](@ref) operation
150615164. If `val` is a tuple containing symbolic elements, creates a `Term` with `tuple` operation
150715175. Otherwise, creates a `Const` variant wrapping the value
15081518
You can’t perform that action at this time.
0 commit comments