-cA¹₂</code></pre><p>Supported operators and functions when creating expressions:</p><ul><li>Basic operators <code>+</code>, <code>-</code>, <code>'</code>, <code>*</code>, <code>^</code>, <code>abs</code>, <code>sin</code>, <code>cos</code> and <code>log</code></li><li>Element-wise operators <code>sin.</code>, <code>cos.</code>, <code>abs.</code>, <code>.*</code>, <code>.^</code> and <code>log.</code></li><li>Vector 1-norm and 2-norm can be computed with <code>LinearAlgebra.norm(..., 1)</code> and <code>LinearAlgebra.norm(..., 2)</code></li><li>Sums of vectors can be computed with <code>sum</code>.</li><li>Matrix traces can be computed with <code>LinearAlgebra.tr</code>.</li><li><code>LinearAlgebra.I</code> for the identity matrix.</li></ul><p>See <a href="../examples/#Creating-Expressions">Creating Expressions</a> for more examples.</p><h2 id="Computing-Derivatives"><a class="docs-heading-anchor" href="#Computing-Derivatives">Computing Derivatives</a><a id="Computing-Derivatives-1"></a><a class="docs-heading-anchor-permalink" href="#Computing-Derivatives" title="Permalink"></a></h2><p>Matrix derivatives are computed on expressions in Ricci-notation directly. <code>DiffMatic</code> provides specialized functions for computing gradients, Jacobians and Hessians respectively.</p><p><a href="../api/#DiffMatic.gradient"><code>gradient</code></a> and <a href="../api/#DiffMatic.hessian"><code>hessian</code></a> require a scalar as input:</p><pre><code class="language-julia hljs">expr = 2 * x' * A * B * x
0 commit comments