Skip to content

Commit 17213d9

Browse files
author
Documenter.jl
committed
build based on 6c10a31
1 parent e52954c commit 17213d9

File tree

6 files changed

+34
-34
lines changed

6 files changed

+34
-34
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-21T20:37:45","documenter_version":"1.7.0"}}
1+
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-22T05:16:58","documenter_version":"1.7.0"}}

previews/PR68/differentiation/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@
9898
\begin{pmatrix}
9999
\Delta s \\ \Delta t \\ \Delta u \\ \Delta v
100100
\end{pmatrix}.\]</p><h2 id="Applications-to-QuatVec-and-Rotor"><a class="docs-heading-anchor" href="#Applications-to-QuatVec-and-Rotor">Applications to <code>QuatVec</code> and <code>Rotor</code></a><a id="Applications-to-QuatVec-and-Rotor-1"></a><a class="docs-heading-anchor-permalink" href="#Applications-to-QuatVec-and-Rotor" title="Permalink"></a></h2><p>To understand how this works for <code>QuatVec</code> and <code>Rotor</code> inputs or outputs, we just consider that these are submanifolds of the <code>Quaternion</code> manifold. The only subtlety is that — while the tangent space to <code>Quaternion</code> and <code>QuatVec</code> are naturally identified with <code>Quaternion</code> and <code>QuatVec</code> themselves — the tangent space of the <code>Rotor</code> submanifold is naturally identified with <code>Quaternion</code>.</p><p>Thus, for a <code>QuatVec</code> input, <span>$w$</span> must always be 0, which means that the tangent must always have <span>$\Delta w = 0$</span>, and we always treat the output functions <span>$(s,t,u,v)$</span> as independent of <span>$w$</span> so that <span>$\partial s / \partial w$</span> and so on are always 0. Similarly, for <code>QuatVec</code> outputs, <span>$s$</span> must always be 0, so that the tangent must always have <span>$\Delta s = 0$</span>, and <span>$\partial s / \partial w$</span> and so on are always 0. With these considerations in mind, it&#39;s not hard to simplify the expressions above for <code>QuatVec</code> inputs and outputs.</p><p>On the other hand, because the tangent space to the <code>Rotor</code> submanifold is naturally identified with <code>Quaternion</code>, while there is a natural constraint on the norms of the input and output arguments, there are no structural constraints on the tangent vectors (just that they must be orthogonal to the arguments themselves). Thus, the expressions above for <code>Quaternion</code> inputs and outputs will look formally identical for <code>Rotor</code> inputs or outputs.</p><h2 id="Older-functions"><a class="docs-heading-anchor" href="#Older-functions">Older functions</a><a id="Older-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Older-functions" title="Permalink"></a></h2><p>In this vein, we also have some very explicit functions for computing &quot;primals&quot; (values) and derivatives of functions of <code>log</code> and <code>exp</code>. These are older, and likely to be deprecated at some point in favor of <code>ChainRulesCore</code>-based AD. Also, because of massive simplifications that result when using the right types, these derivatives are more strict about input types than the main functions themselves. For example, the derivatives of <code>exp</code> are defined only for <code>QuatVec</code> arguments; the derivatives of <code>log</code> are defined only for <code>Rotor</code> arguments; etc.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.exp∂exp-Tuple{QuatVec}" href="#Quaternionic.exp∂exp-Tuple{QuatVec}"><code>Quaternionic.exp∂exp</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">exp∂exp(Z::QuatVec)</code></pre><p>Return the value and gradient of <code>exp(Z)</code> with respect to the components of <code>Z</code>.</p><p>See <a href="#Quaternionic.∂exp-Tuple{QuatVec}"><code>∂exp</code></a> for more explanation of the components of the gradient.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; e, ∂e = exp∂exp(randn(QuatVecF64));
101-
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/18d04eab27f51ff89a71650b862f82f9d3fd8af3/src/gradients_exp_log.jl#L139-L151">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.log∂log-Tuple{Rotor}" href="#Quaternionic.log∂log-Tuple{Rotor}"><code>Quaternionic.log∂log</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">log∂log(Z::Rotor)</code></pre><p>Return the value and gradient of <code>log(Z)</code> with respect to the components of <code>Z</code>.</p><p>See <a href="#Quaternionic.∂log-Tuple{Rotor}"><code>∂log</code></a> for more explanation of the components of the gradient.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; l, ∂l = log∂log(randn(RotorF64));
102-
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/18d04eab27f51ff89a71650b862f82f9d3fd8af3/src/gradients_exp_log.jl#L53-L65">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.∂exp-Tuple{QuatVec}" href="#Quaternionic.∂exp-Tuple{QuatVec}"><code>Quaternionic.∂exp</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">∂exp(Z::QuatVec)</code></pre><p>Return the gradient of <code>exp(Z)</code> with respect to the components of <code>Z</code>.</p><p>The result includes &quot;off-shell&quot; components of the gradient, meaning that even though a scalar component of <code>Z</code> would not be allowed for a <code>QuatVec</code>, we measure the gradient in that direction anyway. That is, the first element of the returned vector of quaternions is</p><p class="math-container">\[\begin{aligned}
101+
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/6c10a31d198d4a9754d9bfe24e241d4850287a0d/src/gradients_exp_log.jl#L139-L151">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.log∂log-Tuple{Rotor}" href="#Quaternionic.log∂log-Tuple{Rotor}"><code>Quaternionic.log∂log</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">log∂log(Z::Rotor)</code></pre><p>Return the value and gradient of <code>log(Z)</code> with respect to the components of <code>Z</code>.</p><p>See <a href="#Quaternionic.∂log-Tuple{Rotor}"><code>∂log</code></a> for more explanation of the components of the gradient.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; l, ∂l = log∂log(randn(RotorF64));
102+
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/6c10a31d198d4a9754d9bfe24e241d4850287a0d/src/gradients_exp_log.jl#L53-L65">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.∂exp-Tuple{QuatVec}" href="#Quaternionic.∂exp-Tuple{QuatVec}"><code>Quaternionic.∂exp</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">∂exp(Z::QuatVec)</code></pre><p>Return the gradient of <code>exp(Z)</code> with respect to the components of <code>Z</code>.</p><p>The result includes &quot;off-shell&quot; components of the gradient, meaning that even though a scalar component of <code>Z</code> would not be allowed for a <code>QuatVec</code>, we measure the gradient in that direction anyway. That is, the first element of the returned vector of quaternions is</p><p class="math-container">\[\begin{aligned}
103103
\left.\frac{\partial} {\partial Z_w} \exp(Z) \right|_{Z_w=0}.
104104
\end{aligned}\]</p><p>Note that, even though <code>exp(::QuatVec)</code> is a <code>Rotor</code>, the derivative (and therefore each element of the result) is a general <code>Quaternion</code>.</p><p>See also <a href="#Quaternionic.∂log-Tuple{Rotor}"><code>∂log</code></a> for a similar function, as well as <a href="#Quaternionic.exp∂exp-Tuple{QuatVec}"><code>exp∂exp</code></a> for a function to compute the value along with the gradient.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; ∂exp∂w, ∂exp∂x, ∂exp∂y, ∂exp∂z = ∂exp(randn(QuatVecF64));
105-
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/18d04eab27f51ff89a71650b862f82f9d3fd8af3/src/gradients_exp_log.jl#L90-L116">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.∂log-Tuple{Rotor}" href="#Quaternionic.∂log-Tuple{Rotor}"><code>Quaternionic.∂log</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">∂log(Z::Rotor)</code></pre><p>Return the gradient of <code>log(Z)</code> with respect to the components of <code>Z</code>.</p><p>The result includes &quot;off-shell&quot; components of the gradient, meaning that even though change of <code>Z</code> in a direction that changes its norm would not be allowed for a <code>Rotor</code>, we measure the gradient in that direction anyway. That is, the elements of the returned vector of quaternions is</p><p class="math-container">\[\begin{aligned}
105+
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/6c10a31d198d4a9754d9bfe24e241d4850287a0d/src/gradients_exp_log.jl#L90-L116">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Quaternionic.∂log-Tuple{Rotor}" href="#Quaternionic.∂log-Tuple{Rotor}"><code>Quaternionic.∂log</code></a><span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">∂log(Z::Rotor)</code></pre><p>Return the gradient of <code>log(Z)</code> with respect to the components of <code>Z</code>.</p><p>The result includes &quot;off-shell&quot; components of the gradient, meaning that even though change of <code>Z</code> in a direction that changes its norm would not be allowed for a <code>Rotor</code>, we measure the gradient in that direction anyway. That is, the elements of the returned vector of quaternions is</p><p class="math-container">\[\begin{aligned}
106106
\left[
107107
\frac{\partial} {\partial Z_w} \log(Z),
108108
\frac{\partial} {\partial Z_x} \log(Z),
109109
\frac{\partial} {\partial Z_y} \log(Z),
110110
\frac{\partial} {\partial Z_z} \log(Z)
111111
\right].
112112
\end{aligned}\]</p><p>Note that, even though <code>log(::Rotor)</code> is a <code>QuatVec</code>, the derivative (and therefore each element of the result) is a general <code>Quaternion</code>.</p><p>See also <a href="#Quaternionic.∂exp-Tuple{QuatVec}"><code>∂exp</code></a> for a similar function, as well as <a href="#Quaternionic.log∂log-Tuple{Rotor}"><code>log∂log</code></a> for a function to compute the value along with the gradient.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; ∂log∂w, ∂log∂x, ∂log∂y, ∂log∂z = ∂log(randn(QuatVecF64));
113-
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/18d04eab27f51ff89a71650b862f82f9d3fd8af3/src/gradients_exp_log.jl#L1-L32">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../functions_of_time/">« Functions of time</a><a class="docs-footer-nextpage" href="../functions/">All functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Monday 21 October 2024 20:37">Monday 21 October 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
113+
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/moble/Quaternionic.jl/blob/6c10a31d198d4a9754d9bfe24e241d4850287a0d/src/gradients_exp_log.jl#L1-L32">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../functions_of_time/">« Functions of time</a><a class="docs-footer-nextpage" href="../functions/">All functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Tuesday 22 October 2024 05:16">Tuesday 22 October 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)