Skip to content

Commit

Permalink
build based on bf2ef05
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 14, 2023
1 parent 8fac132 commit 3f359e8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions dev/howto/integration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
x = rand(3)
y = rand(3)

@ga 3 x::1 ∧ y::1</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Bivector{Float64, 3, 3}(-0.47884135271247763, 0.11308424022653685, 0.5086515000074394)</code></pre><p>If your type does not support indexing, and you don&#39;t want it to, overload <code>SymbolicGA.getcomponent(::T, [i::Int, [j::Int]])</code>:</p><pre><code class="language-julia hljs">struct MyInputType{T}
@ga 3 x::1 ∧ y::1</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Bivector{Float64, 3, 3}(0.10778455679122875, 0.18738998916198488, -0.03656452480750527)</code></pre><p>If your type does not support indexing, and you don&#39;t want it to, overload <code>SymbolicGA.getcomponent(::T, [i::Int, [j::Int]])</code>:</p><pre><code class="language-julia hljs">struct MyInputType{T}
values::Vector{T}
end

Expand All @@ -13,7 +13,7 @@
x = MyInputType(rand(3))
y = MyInputType(rand(3))

@ga 3 x::1 ∧ y::1</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Bivector{Float64, 3, 3}(-0.34870365720634405, -0.6753283846608116, -0.6230627490277898)</code></pre><p>For scalars and aggregates of objects with multiple grades, you will need to overload <code>SymbolicGA.getcomponent(::T)</code> and <code>SymbolicGA.getcomponent(::T, j::Int, i::Int)</code> respectively (see <a href="../../reference/api/#SymbolicGA.getcomponent"><code>SymbolicGA.getcomponent</code></a>).</p><h3 id="Outputs"><a class="docs-heading-anchor" href="#Outputs">Outputs</a><a id="Outputs-1"></a><a class="docs-heading-anchor-permalink" href="#Outputs" title="Permalink"></a></h3><p>If you want to reconstruct a custom type from components, either define a constructor for a single tuple argument, e.g. <code>T(components::Tuple)</code></p><pre><code class="language-julia hljs">struct MyOutputType{T}
@ga 3 x::1 ∧ y::1</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Bivector{Float64, 3, 3}(0.01969239421492358, 0.21620162459584755, 0.2374958645157515)</code></pre><p>For scalars and aggregates of objects with multiple grades, you will need to overload <code>SymbolicGA.getcomponent(::T)</code> and <code>SymbolicGA.getcomponent(::T, j::Int, i::Int)</code> respectively (see <a href="../../reference/api/#SymbolicGA.getcomponent"><code>SymbolicGA.getcomponent</code></a>).</p><h3 id="Outputs"><a class="docs-heading-anchor" href="#Outputs">Outputs</a><a id="Outputs-1"></a><a class="docs-heading-anchor-permalink" href="#Outputs" title="Permalink"></a></h3><p>If you want to reconstruct a custom type from components, either define a constructor for a single tuple argument, e.g. <code>T(components::Tuple)</code></p><pre><code class="language-julia hljs">struct MyOutputType{T}
values::Vector{T}
end

Expand All @@ -22,7 +22,7 @@
x = rand(3)
y = rand(3)

@ga 3 MyOutputType dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Main.MyOutputType{Float64}([-0.6949998090032456, -0.09606737569842556, 0.5348336220925151])</code></pre><p>If you don&#39;t want such constructor to be defined, you can overload <code>SymbolicGA.construct(::Type{T}, ::Tuple)</code> directly:</p><pre><code class="language-julia hljs">struct MyOutputType2{T}
@ga 3 MyOutputType dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Main.MyOutputType{Float64}([-0.18785877149582178, 0.48964283879197723, -0.28616214819530417])</code></pre><p>If you don&#39;t want such constructor to be defined, you can overload <code>SymbolicGA.construct(::Type{T}, ::Tuple)</code> directly:</p><pre><code class="language-julia hljs">struct MyOutputType2{T}
values::Vector{T}
end

Expand All @@ -31,8 +31,8 @@
x = rand(3)
y = rand(3)

@ga 3 MyOutputType2 dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Main.MyOutputType2{Float64}([-0.45232039924532147, 0.3282350144165946, -0.023204208293013395])</code></pre><p>Integrations for <code>Vector</code>, <code>Tuple</code> and <code>&lt;:Real</code> have already been defined:</p><pre><code class="language-julia hljs">@ga 3 Tuple dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(-0.45232039924532147, 0.3282350144165946, -0.023204208293013395)</code></pre><pre><code class="language-julia hljs">@ga 3 Vector dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">3-element Vector{Float64}:
-0.45232039924532147
0.3282350144165946
-0.023204208293013395</code></pre><pre><code class="language-julia hljs">z = rand(3)
@ga 3 Float16 dual(x::1 ∧ y::1 ∧ z::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Float16(-0.241)</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../explanation/design/">« Design</a><a class="docs-footer-nextpage" href="../spaces/">Create user-defined geometric spaces »</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.25 on <span class="colophon-date" title="Thursday 14 September 2023 15:05">Thursday 14 September 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
@ga 3 MyOutputType2 dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Main.MyOutputType2{Float64}([-0.2468545562328771, 0.3371653829727226, -0.044990327030699634])</code></pre><p>Integrations for <code>Vector</code>, <code>Tuple</code> and <code>&lt;:Real</code> have already been defined:</p><pre><code class="language-julia hljs">@ga 3 Tuple dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(-0.2468545562328771, 0.3371653829727226, -0.044990327030699634)</code></pre><pre><code class="language-julia hljs">@ga 3 Vector dual(x::1 ∧ y::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">3-element Vector{Float64}:
-0.2468545562328771
0.3371653829727226
-0.044990327030699634</code></pre><pre><code class="language-julia hljs">z = rand(3)
@ga 3 Float16 dual(x::1 ∧ y::1 ∧ z::1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Float16(0.2289)</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../explanation/design/">« Design</a><a class="docs-footer-nextpage" href="../spaces/">Create user-defined geometric spaces »</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.25 on <span class="colophon-date" title="Thursday 14 September 2023 15:05">Thursday 14 September 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 3f359e8

Please sign in to comment.