File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 100100
101101isidx (x) = x isa TermCombination
102102
103+ """
104+ ```julia
105+ hessian_sparsity(ops::AbstractVector{<:Expression}, vars::AbstractVector{<:Expression})
106+ ```
107+
108+ Return the sparsity pattern of the Hessian of an array of expressions with respect to
109+ an array of variable expressions.
110+ """
111+ function hessian_sparsity end
112+
103113let
104114 _scalar = one (TermCombination)
105115
123133 end
124134 end ] |> Rewriters. Chain |> Rewriters. Postwalk |> Rewriters. Fixpoint
125135
126- # we do this in a let block so that Revise works on the list of rules
127136 global hessian_sparsity
128-
129- """
130- ```julia
131- hessian_sparsity(ops::AbstractVector{<:Expression}, vars::AbstractVector{<:Expression})
132- ```
133-
134- Return the sparsity pattern of the Hessian of an array of expressions with respect to
135- an array of variable expressions.
136- """
137+ # we do this in a let block so that Revise works on the list of rules
137138 function hessian_sparsity (f, u)
138139 idx (i) = TermCombination (Set ([Dict (i=> 1 )]))
139140 dict = Dict (SymbolicUtils. to_symbolic .(u) .=> idx .(1 : length (u)))
You can’t perform that action at this time.
0 commit comments