-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Jul 6, 2024
1 parent
0e70953
commit 49c7fe1
Showing
25 changed files
with
1,149 additions
and
1,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-06T17:01:19","documenter_version":"1.5.0"}} | ||
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-06T17:09:48","documenter_version":"1.5.0"}} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Inverting Integrals · DataInterpolations.jl</title><meta name="title" content="Inverting Integrals · DataInterpolations.jl"/><meta property="og:title" content="Inverting Integrals · DataInterpolations.jl"/><meta property="twitter:title" content="Inverting Integrals · DataInterpolations.jl"/><meta name="description" content="Documentation for DataInterpolations.jl."/><meta property="og:description" content="Documentation for DataInterpolations.jl."/><meta property="twitter:description" content="Documentation for DataInterpolations.jl."/><meta property="og:url" content="https://docs.sciml.ai/DataInterpolations/stable/inverting_integrals/"/><meta property="twitter:url" content="https://docs.sciml.ai/DataInterpolations/stable/inverting_integrals/"/><link rel="canonical" href="https://docs.sciml.ai/DataInterpolations/stable/inverting_integrals/"/><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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="DataInterpolations.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">DataInterpolations.jl</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="../">DataInterpolations.jl</a></li><li><a class="tocitem" href="../methods/">Methods</a></li><li><a class="tocitem" href="../interface/">Interface</a></li><li><a class="tocitem" href="../manual/">Manual</a></li><li class="is-active"><a class="tocitem" href>Inverting Integrals</a><ul class="internal"><li><a class="tocitem" href="#Docstrings"><span>Docstrings</span></a></li></ul></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>Inverting Integrals</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Inverting Integrals</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/SciML/DataInterpolations.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/SciML/DataInterpolations.jl/blob/master/docs/src/inverting_integrals.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="Inverting-integrals"><a class="docs-heading-anchor" href="#Inverting-integrals">Inverting integrals</a><a id="Inverting-integrals-1"></a><a class="docs-heading-anchor-permalink" href="#Inverting-integrals" title="Permalink"></a></h1><p>Solving implicit integral problems of the form:</p><p class="math-container">\[\begin{equation} | ||
\text{find $t$ such that } \int_{t_1}^t f(\tau)\text{d}\tau = V \ge 0 | ||
\end{equation}\]</p><p>is supported for interpolations <span>$f$</span> that are strictly positive and of one of these types:</p><ul><li><code>ConstantInterpolation</code></li><li><code>LinearInterpolation</code></li></ul><p>This is done by creating an 'integral inverse' interpolation object which can efficiently compute <span>$t$</span> for a given value of <span>$V$</span>, see the example below.</p><pre><code class="language-julia hljs">using DataInterpolations | ||
using Plots | ||
|
||
# Create LinearInterpolation object from the | ||
u = sqrt.(1:25) + (2.0 * rand(25) .- 1.0) / 3 | ||
t = cumsum(rand(25)) | ||
A = LinearInterpolation(u, t) | ||
|
||
# Create LinearInterpolationIntInv object | ||
# from the LinearInterpolation object | ||
A_intinv = DataInterpolations.invert_integral(A) | ||
|
||
# Get the t values up to and including the | ||
# solution to the integral problem | ||
V = 25.0 | ||
t_ = A_intinv(V) | ||
ts = t[t .<= t_] | ||
push!(ts, t_) | ||
|
||
# Plot results | ||
plot(A; label = "Linear Interpolation") | ||
plot!(ts, A.(ts), fillrange = 0.0, fillalpha = 0.75, | ||
fc = :blues, lw = 0, label = "Area of $V")</code></pre><img src="4bea52d7.svg" alt="Example block output"/><h2 id="Docstrings"><a class="docs-heading-anchor" href="#Docstrings">Docstrings</a><a id="Docstrings-1"></a><a class="docs-heading-anchor-permalink" href="#Docstrings" title="Permalink"></a></h2><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="DataInterpolations.invert_integral" href="#DataInterpolations.invert_integral"><code>DataInterpolations.invert_integral</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">invert_integral(A::AbstractInterpolation)::AbstractIntegralInverseInterpolation</code></pre><p>Creates the inverted integral interpolation object from the given interpolation. Conditions:</p><ul><li>The range of <code>A</code> must be strictly positive</li><li>There must be an ordering defined on the data type of <code>A.u</code></li><li>This is currently only supported for ConstantInterpolation and LinearInterpolation</li></ul><p><strong>Arguments</strong></p><ul><li><code>A</code>: interpolation object satisfying the above requirements</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/DataInterpolations.jl/blob/152bcbfb1a06f415ce00eff1ac24f28f4fad40c0/src/integral_inverses.jl#L3-L15">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="DataInterpolations.ConstantInterpolationIntInv" href="#DataInterpolations.ConstantInterpolationIntInv"><code>DataInterpolations.ConstantInterpolationIntInv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">some stuff</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/DataInterpolations.jl/blob/152bcbfb1a06f415ce00eff1ac24f28f4fad40c0/src/integral_inverses.jl#L58-L60">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="DataInterpolations.LinearInterpolationIntInv" href="#DataInterpolations.LinearInterpolationIntInv"><code>DataInterpolations.LinearInterpolationIntInv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">some stuff</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/DataInterpolations.jl/blob/152bcbfb1a06f415ce00eff1ac24f28f4fad40c0/src/integral_inverses.jl#L24-L26">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../manual/">« Manual</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.5.0 on <span class="colophon-date" title="Saturday 6 July 2024 17:09">Saturday 6 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.