Skip to content

Commit

Permalink
build based on aece34c
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed May 9, 2023
1 parent fd5e9f4 commit 54d4028
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 70 deletions.
6 changes: 3 additions & 3 deletions dev/design/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
julia> sum(basis(Cl("++"))) # shorthand for metric signature (1, 1)
2-component Multivector{Cl("++"), 1, MVector{2, Int64}}:
1 v1
1 v2</code></pre><h3 id="sig-interface"><a class="docs-heading-anchor" href="#sig-interface">The metric signature interface</a><a id="sig-interface-1"></a><a class="docs-heading-anchor-permalink" href="#sig-interface" title="Permalink"></a></h3><p>The metric signature type parameter may be any <code>isbits</code> value satisying the following interface. As well as defining the geometric algebra, the signature is used to specify basis blade labels, the default array type for multivector components, and other metadata.</p><table><tr><th style="text-align: left">Required methods</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>dimension(sig)</code></td><td style="text-align: left">The dimension of the underlying vector space, or number of basis vectors.</td></tr><tr><td style="text-align: left"><code>basis_vector_norm(sig, i)</code></td><td style="text-align: left">The norm of the <code>i</code>th basis vector.</td></tr></table><table><tr><th style="text-align: left">Optional methods</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>show_signature(io, sig)</code></td><td style="text-align: left">Show the metric signature in a compact human-readable form.</td></tr><tr><td style="text-align: left"><code>show_basis_blade(io, sig, indices)</code></td><td style="text-align: left">Print a basis blade with the given indices (e.g., <code>v12</code> or <code>𝒆₁∧𝒆₂</code>).</td></tr><tr><td style="text-align: left"><code>componentstype(sig, N, T)</code></td><td style="text-align: left">Preferred array type for <code>Multivector{sig}</code> components. (E.g., <code>Vector</code>, <code>MVector</code>, <code>SparseVector</code>, etc.)</td></tr><tr><td style="text-align: left"><code>use_symbolic_optim(sig)</code></td><td style="text-align: left">Whether to use symbolic code generation to optimise multivector products. (Default is true for low dimensions.)</td></tr></table><p>Below is an example of how one might define a geometric algebra with specific behaviours:</p><pre><code class="language-julia hljs">struct DiracGamma end
1 v2</code></pre><h3 id="sig-interface"><a class="docs-heading-anchor" href="#sig-interface">The metric signature interface</a><a id="sig-interface-1"></a><a class="docs-heading-anchor-permalink" href="#sig-interface" title="Permalink"></a></h3><p>The metric signature type parameter may be any <code>isbits</code> value satisying the following interface. As well as defining the geometric algebra, the signature is used to specify basis blade labels, the default array type for multivector components, and other metadata.</p><table><tr><th style="text-align: left">Required methods</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>dimension(sig)</code></td><td style="text-align: left">The dimension of the underlying vector space, or number of basis vectors.</td></tr><tr><td style="text-align: left"><code>basis_vector_square(sig, i)</code></td><td style="text-align: left">The scalar square of the <code>i</code>th basis vector.</td></tr></table><table><tr><th style="text-align: left">Optional methods</th><th style="text-align: left">Description</th></tr><tr><td style="text-align: left"><code>show_signature(io, sig)</code></td><td style="text-align: left">Show the metric signature in a compact human-readable form.</td></tr><tr><td style="text-align: left"><code>show_basis_blade(io, sig, indices)</code></td><td style="text-align: left">Print a basis blade with the given indices (e.g., <code>v12</code> or <code>𝒆₁∧𝒆₂</code>).</td></tr><tr><td style="text-align: left"><code>componentstype(sig, N, T)</code></td><td style="text-align: left">Preferred array type for <code>Multivector{sig}</code> components. (E.g., <code>Vector</code>, <code>MVector</code>, <code>SparseVector</code>, etc.)</td></tr><tr><td style="text-align: left"><code>use_symbolic_optim(sig)</code></td><td style="text-align: left">Whether to use symbolic code generation to optimise multivector products. (Default is true for low dimensions.)</td></tr></table><p>Below is an example of how one might define a geometric algebra with specific behaviours:</p><pre><code class="language-julia hljs">struct DiracGamma end

# define the algebra
GeometricAlgebra.dimension(::DiracGamma) = 4
GeometricAlgebra.basis_vector_norm(::DiracGamma, i) = i &gt; 1 ? -1 : +1
GeometricAlgebra.basis_vector_square(::DiracGamma, i) = i &gt; 1 ? -1 : +1

# set the preferred component storage type (optional)
using StaticArrays
Expand Down Expand Up @@ -46,4 +46,4 @@
4-component Multivector{3, 0:2:2, MVector{4, Any}}:
x[1]*y[1] + x[2]*y[2] + x[3]*y[3]
x[1]*y[2] - x[2]*y[1] v12 + x[1]*y[3] - x[3]*y[1] v13 + x[2]*y[3] - x[3]*y[2] v23
</code></pre><p>This makes it easy to optimize multivector operations by first performing the general calculation symbolically, then converting the resulting expression into unrolled code. (See <a href="../reference/#GeometricAlgebra.symbolic_multivector_eval-Tuple{Type{Expr}, Type, Function, Vararg{Any}}"><code>symbolic_multivector_eval()</code></a> for details.)</p><p>By default, symbolic code generation is used for most products in up to eight dimensions (above which general algebraic expressions become unwieldy). This can be changed on a per-algebra basis by defining methods for <a href="../reference/#GeometricAlgebra.use_symbolic_optim-Tuple{Any}"><code>use_symbolic_optim()</code></a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« GeometricAlgebra</a><a class="docs-footer-nextpage" href="../theory/basics/">Introduction »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Tuesday 9 May 2023 11:06">Tuesday 9 May 2023</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
</code></pre><p>This makes it easy to optimize multivector operations by first performing the general calculation symbolically, then converting the resulting expression into unrolled code. (See <a href="../reference/#GeometricAlgebra.symbolic_multivector_eval-Tuple{Type{Expr}, Type, Function, Vararg{Any}}"><code>symbolic_multivector_eval()</code></a> for details.)</p><p>By default, symbolic code generation is used for most products in up to eight dimensions (above which general algebraic expressions become unwieldy). This can be changed on a per-algebra basis by defining methods for <a href="../reference/#GeometricAlgebra.use_symbolic_optim-Tuple{Any}"><code>use_symbolic_optim()</code></a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« GeometricAlgebra</a><a class="docs-footer-nextpage" href="../theory/basics/">Introduction »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Tuesday 9 May 2023 11:24">Tuesday 9 May 2023</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
[ Info: Defined basis blades v1, v2, v3, v4, v12, v13, v23, v14, v24, v34, v123, v124, v134, v234, v1234, I in Main

julia&gt; @basis (t = +1, x = -1) allperms=true
[ Info: Defined basis blades t, x, tx, xt, I in Main</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="design/">Design and Internals »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Tuesday 9 May 2023 11:06">Tuesday 9 May 2023</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
[ Info: Defined basis blades t, x, tx, xt, I in Main</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="design/">Design and Internals »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Tuesday 9 May 2023 11:24">Tuesday 9 May 2023</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 54d4028

Please sign in to comment.