Skip to content

Commit

Permalink
build based on 16869a3
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 8, 2024
1 parent 2578556 commit e699125
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 15,438 deletions.
7,699 changes: 2 additions & 7,697 deletions dev/assets/themes/documenter-dark.css

Large diffs are not rendered by default.

7,733 changes: 2 additions & 7,731 deletions dev/assets/themes/documenter-light.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/install/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
pkg&gt; test LazyAlgebra</code></pre><p>If something goes wrong, it may be because you already have an old version of LazyAlgebra. Uninstall LazyAlgebra as follows:</p><pre><code class="language-julia hljs">pkg&gt; rm LazyAlgebra
pkg&gt; gc
pkg&gt; add https://github.com/emmt/LazyAlgebra.jl</code></pre><p>before re-installing.</p><p>To revert to Julia&#39;s REPL, hit the <code>Backspace</code> key at the <code>... pkg&gt;</code> prompt.</p><h2 id="Installation-in-scripts"><a class="docs-heading-anchor" href="#Installation-in-scripts">Installation in scripts</a><a id="Installation-in-scripts-1"></a><a class="docs-heading-anchor-permalink" href="#Installation-in-scripts" title="Permalink"></a></h2><p>To install LazyAlgebra in a Julia script, write:</p><pre><code class="language-julia hljs">if VERSION &gt;= v&quot;0.7.0-&quot;; using Pkg; end
Pkg.add(PackageSpec(url=&quot;https://github.com/emmt/LazyAlgebra.jl&quot;, rev=&quot;master&quot;));</code></pre><p>or with <code>url=&quot;git@github.com:emmt/LazyAlgebra.jl&quot;</code> if you want to use <code>ssh</code>.</p><p>This also works from the Julia REPL.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../introduction/">Lazy algebra framework »</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.23 on <span class="colophon-date" title="Thursday 10 November 2022 14:14">Thursday 10 November 2022</span>. Using Julia version 1.8.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Pkg.add(PackageSpec(url=&quot;https://github.com/emmt/LazyAlgebra.jl&quot;, rev=&quot;master&quot;));</code></pre><p>or with <code>url=&quot;git@github.com:emmt/LazyAlgebra.jl&quot;</code> if you want to use <code>ssh</code>.</p><p>This also works from the Julia REPL.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../introduction/">Lazy algebra framework »</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="Friday 8 March 2024 18:37">Friday 8 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/introduction/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
E = inv(D)</code></pre><p>yields <code>E</code> which is another reference to <code>A</code>. In other words, <code>inv(inv(A)) -&gt; A</code> holds assuming by default that <code>A</code> is invertible. This follows the principles of laziness. It is however, possible to prevent this by extending the <code>Base.inv</code> method so as to throw an exception when applied to the specific type of <code>A</code>:</p><pre><code class="language-julia hljs">Base.inv(::SomeNonInvertibleMapping) = error(&quot;non-invertible mapping&quot;)</code></pre><p>where <code>SomeNonInvertibleMapping &lt;: Mapping</code> is the type of <code>A</code>.</p><p>Other example of simplifications:</p><pre><code class="language-julia hljs">B = 3A
C = 7B&#39;</code></pre><p>where mappings <code>B</code> and <code>C</code> are such that <code>B*x -&gt; 3*(A*x)</code> and <code>C*x -&gt; 21*(A*x)</code> for any <em>vector</em> <code>x</code>. That is <code>C*x</code> is evaluated as <code>21*(A*x)</code> not as <code>7*(3*(A*x))</code> thanks to simplifications occurring while the mapping <code>C</code> is constructed.</p><p>Using the <code>-&gt;</code> to denote in the right-hand side the actual construction made by LazyAlgebra for the expression in the left-hand side and assuming <code>A</code>, <code>B</code> and <code>C</code> are linear mappings, the following simplications will occur:</p><pre><code class="language-julia hljs">(A + C + B + 3C)&#39; -&gt; A&#39; + B&#39; + 4C&#39;
(A*B*3C)&#39; -&gt; 3C&#39;*B&#39;*A&#39;
inv(A*B*3C) -&gt; 3\inv(C)*inv(B)*inv(A)</code></pre><p>However, if <code>M</code> is a non-linear mapping, then:</p><pre><code class="language-julia hljs">inv(A*B*3M) -&gt; inv(M)*(3\inv(B))*inv(A)</code></pre><p>which can be compared to <code>inv(A*B*3C)</code> when all operands are linear mappings.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Due to the associative rules applied by Julia, parentheses are needed around constructions like <code>3*C</code> if it has to be interpreted as <code>3C</code> in all contexes. Otherwise, <code>A*B*(3*C)</code> is equivalent to <code>A*B*3C</code> while <code>A*B*3*C</code> is interpreted as <code>((A*B)*3)*C</code>; that is, compose <code>A</code> and <code>B</code>, apply <code>A*B</code> to <code>3</code> and right multiply the result by <code>C</code>.</p></div></div><h2 id="Creating-new-mappings"><a class="docs-heading-anchor" href="#Creating-new-mappings">Creating new mappings</a><a id="Creating-new-mappings-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-new-mappings" title="Permalink"></a></h2><p>LazyAlgebra provides a number of simple mappings. Creating new primitive mapping types (not by combining existing mappings as explained above) which benefit from the LazyAlgebra framework is as simple as declaring a new mapping subtype of <code>Mapping</code> (or one of its abstract subtypes) and extending two methods <code>vcreate</code> and <code>apply!</code> specialized for the new mapping type. For mode details, see <a href="../mappings/">here</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../install/">« Installation</a><a class="docs-footer-nextpage" href="../vectors/">Methods for vectors »</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.23 on <span class="colophon-date" title="Thursday 10 November 2022 14:14">Thursday 10 November 2022</span>. Using Julia version 1.8.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
inv(A*B*3C) -&gt; 3\inv(C)*inv(B)*inv(A)</code></pre><p>However, if <code>M</code> is a non-linear mapping, then:</p><pre><code class="language-julia hljs">inv(A*B*3M) -&gt; inv(M)*(3\inv(B))*inv(A)</code></pre><p>which can be compared to <code>inv(A*B*3C)</code> when all operands are linear mappings.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Due to the associative rules applied by Julia, parentheses are needed around constructions like <code>3*C</code> if it has to be interpreted as <code>3C</code> in all contexes. Otherwise, <code>A*B*(3*C)</code> is equivalent to <code>A*B*3C</code> while <code>A*B*3*C</code> is interpreted as <code>((A*B)*3)*C</code>; that is, compose <code>A</code> and <code>B</code>, apply <code>A*B</code> to <code>3</code> and right multiply the result by <code>C</code>.</p></div></div><h2 id="Creating-new-mappings"><a class="docs-heading-anchor" href="#Creating-new-mappings">Creating new mappings</a><a id="Creating-new-mappings-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-new-mappings" title="Permalink"></a></h2><p>LazyAlgebra provides a number of simple mappings. Creating new primitive mapping types (not by combining existing mappings as explained above) which benefit from the LazyAlgebra framework is as simple as declaring a new mapping subtype of <code>Mapping</code> (or one of its abstract subtypes) and extending two methods <code>vcreate</code> and <code>apply!</code> specialized for the new mapping type. For mode details, see <a href="../mappings/">here</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../install/">« Installation</a><a class="docs-footer-nextpage" href="../vectors/">Methods for vectors »</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="Friday 8 March 2024 18:37">Friday 8 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/mappings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
(A.outdims == B.outdims &amp;&amp; A.inpdims == B.inpdims &amp;&amp;
A.A === B.A &amp;&amp; A.I === B.I &amp;&amp; A.J === B.J)</code></pre><p>Remarks:</p><ul><li><p>In our example, arrays are restricted to be <em>dense</em> so that linear indexing is efficient. For the sake of clarity, the above code is intended to be correct although there are many possible optimizations.</p></li><li><p>If <code>α = 0</code> there is nothing to do except scale <code>y</code> by <code>β</code>.</p></li><li><p>The call to <code>vscale!(β, y)</code> is to properly initialize <code>y</code>. Remember the convention that the contents of <code>y</code> is not used at all if <code>β = 0</code> so <code>y</code> does not need to be properly initialized in that case, it will simply be zero-filled by the call to <code>vscale!</code>. The statements</p><pre><code class="language-julia hljs">β == 1 || vscale!(y, β)</code></pre><p>are equivalent to:</p><pre><code class="language-julia hljs">if β != 1
vscale!(y, β)
end</code></pre><p>which may be simplified to just calling <code>vscale!</code> unconditionally:</p><pre><code class="language-julia hljs">vscale!(y, β)</code></pre><p>as <code>vscale!(y, β)</code> does nothing if <code>β = 1</code>.</p></li><li><p><code>@inbounds</code> could be used for the loops but this would require checking that all indices are whithin the bounds. In this example, only <code>k</code> is guaranteed to be valid, <code>i</code> and <code>j</code> have to be checked.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../sparse/">« Sparse operators</a><a class="docs-footer-nextpage" href="../simplifications/">Simplification and optimization of combinations of mappings »</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.23 on <span class="colophon-date" title="Thursday 10 November 2022 14:14">Thursday 10 November 2022</span>. Using Julia version 1.8.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><p>which may be simplified to just calling <code>vscale!</code> unconditionally:</p><pre><code class="language-julia hljs">vscale!(y, β)</code></pre><p>as <code>vscale!(y, β)</code> does nothing if <code>β = 1</code>.</p></li><li><p><code>@inbounds</code> could be used for the loops but this would require checking that all indices are whithin the bounds. In this example, only <code>k</code> is guaranteed to be valid, <code>i</code> and <code>j</code> have to be checked.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../sparse/">« Sparse operators</a><a class="docs-footer-nextpage" href="../simplifications/">Simplification and optimization of combinations of mappings »</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="Friday 8 March 2024 18:37">Friday 8 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit e699125

Please sign in to comment.