Skip to content

Commit 3c1f05c

Browse files
author
Documenter.jl
committed
build based on 36aca91
1 parent 2cf5fec commit 3c1f05c

File tree

8 files changed

+37
-37
lines changed

8 files changed

+37
-37
lines changed

dev/.documenter-siteinfo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-31T12:07:12","documenter_version":"1.2.1"}}
1+
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-07T17:15:51","documenter_version":"1.2.1"}}

dev/appendix/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
y}\right)_{y = \bar{y}} \sigma_y \right)^2 + \left(
4545
\left(\frac{\partial G}{\partial b}\frac{\partial b}{\partial
4646
z}\right)_{z = \bar{z}} \sigma_z \right)^2\]</p><p>What <code>Measurements.jl</code> really does is to calculate the derivatives like <span>$\partial a/\partial x$</span> and <span>$\partial G/\partial x = (\partial G/\partial a)(\partial a/\partial x) + (\partial G/\partial b)(\partial b/\partial x)$</span>, and store them in the <code>der</code> field of <span>$a$</span> and <span>$G$</span> respectively in order to be able to perform further operations involving these quantities.</p><p>This method is also described in the paper by Giordano, M.</p><h2 id="Defining-Methods-for-Mathematical-Operations"><a class="docs-heading-anchor" href="#Defining-Methods-for-Mathematical-Operations">Defining Methods for Mathematical Operations</a><a id="Defining-Methods-for-Mathematical-Operations-1"></a><a class="docs-heading-anchor-permalink" href="#Defining-Methods-for-Mathematical-Operations" title="Permalink"></a></h2><p><code>Measurements.jl</code> defines new methods for mathematical operations in order to make them accept <code>Measurement</code> arguments. The single most important thing to know about how to define new methods in the package is the <code>Measurements.result</code>. This function, not exported because it is intended to be used only within the package, takes care of propagating the uncertainty as described in the section above. It has two methods: one for functions with arity equal to one, and the other for any other case. This is its syntax:</p><pre><code class="language-julia hljs">result(val::Real, der::Real, a::Measurement)</code></pre><p>for functions of one argument, and</p><pre><code class="language-julia hljs">result(val, der, a)</code></pre><p>for functions of two or more arguments. The arguments are:</p><ul><li><code>val</code>: the nominal result of the operation <span>$G(a, \dots)$</span>;</li><li><code>der</code>: the partial derivative <span>$\partial G/\partial a$</span> of a function <span>$G = G(a)$</span> with respect to the argument <span>$a$</span> for one-argument functions or the tuple of partial derivatives with respect to each argument in other cases;</li><li><code>a</code>: the argument(s) of <span>$G$</span>, in the same order as the corresponding derivatives in <code>der</code> argument.</li></ul><p>In the case of functions with arity larger than one, <code>der</code> and <code>a</code> tuples must have the same length.</p><p>For example, for a one-argument function like <span>$\cos$</span> we have</p><pre><code class="language-julia hljs">cos(a::Measurement) = result(cos(a.val), -sin(a.val), a)</code></pre><p>Instead, the method for subtraction operation is defined as follows:</p><pre><code class="language-julia hljs">-(a::Measurement, b::Measurement) =
47-
result(a.val - b.val, (1, -1), (a, b))</code></pre><p>Thus, in order to support <code>Measurement</code> argument(s) for a new mathematical operation you have to calculate the result of the operation, the partial derivatives of the function with respect to all arguments and then pass this information to <code>Measurements.result</code> function.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../todo/">« Development</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 31 January 2024 12:07">Wednesday 31 January 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
47+
result(a.val - b.val, (1, -1), (a, b))</code></pre><p>Thus, in order to support <code>Measurement</code> argument(s) for a new mathematical operation you have to calculate the result of the operation, the partial derivatives of the function with respect to all arguments and then pass this information to <code>Measurements.result</code> function.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../todo/">« Development</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 7 February 2024 17:15">Wednesday 7 February 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/examples/index.html

+24-24
Large diffs are not rendered by default.

dev/index.html

+1-1
Large diffs are not rendered by default.

dev/installation/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<!DOCTYPE html>
22
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Installation · Measurements</title><meta name="title" content="Installation · Measurements"/><meta property="og:title" content="Installation · Measurements"/><meta property="twitter:title" content="Installation · Measurements"/><meta name="description" content="Documentation for Measurements."/><meta property="og:description" content="Documentation for Measurements."/><meta property="twitter:description" content="Documentation for Measurements."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">Measurements</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Introduction</a></li><li class="is-active"><a class="tocitem" href>Installation</a></li><li><a class="tocitem" href="../usage/">Usage</a></li><li><a class="tocitem" href="../examples/">Examples</a></li><li><a class="tocitem" href="../performance/">Performance</a></li><li><a class="tocitem" href="../todo/">Development</a></li><li><a class="tocitem" href="../appendix/">Appendix</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Installation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Installation</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/JuliaPhysics/Measurements.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/JuliaPhysics/Measurements.jl/blob/master/docs/src/installation.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Installation"><a class="docs-heading-anchor" href="#Installation">Installation</a><a id="Installation-1"></a><a class="docs-heading-anchor-permalink" href="#Installation" title="Permalink"></a></h1><p>The latest version of <code>Measurements.jl</code> is available for Julia v1.0 and later releases, and can be installed with <a href="https://julialang.github.io/Pkg.jl/stable/">Julia built-in package manager</a>. In a Julia session, after entering the package manager mode with <code>]</code>, run the command</p><pre><code class="language-julia hljs">pkg&gt; update
3-
pkg&gt; add Measurements</code></pre><p>Older versions of this package are also available for Julia 0.4-0.7.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Introduction</a><a class="docs-footer-nextpage" href="../usage/">Usage »</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 31 January 2024 12:07">Wednesday 31 January 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
3+
pkg&gt; add Measurements</code></pre><p>Older versions of this package are also available for Julia 0.4-0.7.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Introduction</a><a class="docs-footer-nextpage" href="../usage/">Usage »</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 7 February 2024 17:15">Wednesday 7 February 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/performance/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@
125125
maximum time: 50.107 ms (94.99% GC)
126126
--------------
127127
samples: 2283
128-
evals/sample: 1</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><a class="docs-footer-nextpage" href="../todo/">Development »</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 31 January 2024 12:07">Wednesday 31 January 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
128+
evals/sample: 1</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><a class="docs-footer-nextpage" href="../todo/">Development »</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><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 7 February 2024 17:15">Wednesday 7 February 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)