Skip to content

Commit

Permalink
build based on 1a9d4fb
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Dec 28, 2023
1 parent 443bec8 commit a91ae0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dev/api/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>FLCC documentation · FastLocalCorrelationCoefficients.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://pitsianis.github.io/FastLocalCorrelationCoefficients.jl/api/"/><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.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/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="../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="../">FastLocalCorrelationCoefficients.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../waldo/">Where&#39;s Waldo?</a></li><li class="is-active"><a class="tocitem" href>FLCC documentation</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"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>FLCC documentation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>FLCC documentation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/master/docs/src/api.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="FLCC-documentation"><a class="docs-heading-anchor" href="#FLCC-documentation">FLCC documentation</a><a id="FLCC-documentation-1"></a><a class="docs-heading-anchor-permalink" href="#FLCC-documentation" title="Permalink"></a></h1><p>The <a href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl">FastLocalCorrelationCoefficients</a> package exports the following functions</p><ul><li><a href="#FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}"><code>FastLocalCorrelationCoefficients.best_correlated</code></a></li><li><a href="#FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}"><code>FastLocalCorrelationCoefficients.flcc</code></a></li><li><a href="#FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}"><code>FastLocalCorrelationCoefficients.lcc</code></a></li></ul><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}" href="#FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}"><code>FastLocalCorrelationCoefficients.best_correlated</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> best_correlated(c::AbstractArray)</code></pre><p>Locate the position of the element with the maximum local correlation value.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/434a07dad4b88820a58314b4805cf2e8fd3ea112/src/flcc.jl#L175-L180">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}" href="#FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}"><code>FastLocalCorrelationCoefficients.flcc</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> flcc(haystack,needle)</code></pre><p>Calculate the local (Pearson) correlation coefficients</p><p><span>$\mathrm{lcc}(x,y) = \frac{(x - \mu_x)^T(y - \mu_y)}{\sigma_x \sigma_y}$</span></p><p>between <code>needle</code> and all sliding windows of same size within <code>haystack</code>.</p><p><code>flcc</code> uses the fast Fourier transform to reduce the computational complexity from O(<span>$n_H n_N$</span>) to O((<span>$n_H + n_N) log(n_H + n_N)$</span>), where <span>$n_H$</span> and <span>$n_N$</span> are the number of elements of the <code>haystack</code> and the <code>needle</code>, respectively.</p><p><code>flcc</code> supports tensors of any dimensions with real or complex entries.</p><p><strong>Examples</strong></p><p>Suppose you have a <code>haystack</code>, a tensor of reals and a <code>needle</code>, a smaller tensor of the same dimensionality that you are are trying to locate in the <code>haystack</code>. Note that the <code>needle</code> might be scaled and translated.</p><p>The position of the maximum element of <code>LCC</code> is the best match between the <code>needle</code> and a sliding window of the <code>haystack</code></p><pre><code class="language-julia-repl hljs">julia&gt; using FastLocalCorrelationCoefficients
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>FLCC documentation · FastLocalCorrelationCoefficients.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://pitsianis.github.io/FastLocalCorrelationCoefficients.jl/api/"/><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.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/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="../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="../">FastLocalCorrelationCoefficients.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../waldo/">Where&#39;s Waldo?</a></li><li class="is-active"><a class="tocitem" href>FLCC documentation</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"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>FLCC documentation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>FLCC documentation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/master/docs/src/api.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="FLCC-documentation"><a class="docs-heading-anchor" href="#FLCC-documentation">FLCC documentation</a><a id="FLCC-documentation-1"></a><a class="docs-heading-anchor-permalink" href="#FLCC-documentation" title="Permalink"></a></h1><p>The <a href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl">FastLocalCorrelationCoefficients</a> package exports the following functions</p><ul><li><a href="#FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}"><code>FastLocalCorrelationCoefficients.best_correlated</code></a></li><li><a href="#FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}"><code>FastLocalCorrelationCoefficients.flcc</code></a></li><li><a href="#FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}"><code>FastLocalCorrelationCoefficients.lcc</code></a></li></ul><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}" href="#FastLocalCorrelationCoefficients.best_correlated-Tuple{AbstractArray}"><code>FastLocalCorrelationCoefficients.best_correlated</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> best_correlated(c::AbstractArray)</code></pre><p>Locate the position of the element with the maximum local correlation value.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/1a9d4fb89c84d507730689e1a85f33947c526eaa/src/flcc.jl#L175-L180">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}" href="#FastLocalCorrelationCoefficients.flcc-Tuple{AbstractArray, AbstractArray}"><code>FastLocalCorrelationCoefficients.flcc</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> flcc(haystack,needle)</code></pre><p>Calculate the local (Pearson) correlation coefficients</p><p><span>$\mathrm{lcc}(x,y) = \frac{(x - \mu_x)^T(y - \mu_y)}{\sigma_x \sigma_y}$</span></p><p>between <code>needle</code> and all sliding windows of same size within <code>haystack</code>.</p><p><code>flcc</code> uses the fast Fourier transform to reduce the computational complexity from O(<span>$n_H n_N$</span>) to O((<span>$n_H + n_N) log(n_H + n_N)$</span>), where <span>$n_H$</span> and <span>$n_N$</span> are the number of elements of the <code>haystack</code> and the <code>needle</code>, respectively.</p><p><code>flcc</code> supports tensors of any dimensions with real or complex entries.</p><p><strong>Examples</strong></p><p>Suppose you have a <code>haystack</code>, a tensor of reals and a <code>needle</code>, a smaller tensor of the same dimensionality that you are are trying to locate in the <code>haystack</code>. Note that the <code>needle</code> might be scaled and translated.</p><p>The position of the maximum element of <code>LCC</code> is the best match between the <code>needle</code> and a sliding window of the <code>haystack</code></p><pre><code class="language-julia-repl hljs">julia&gt; using FastLocalCorrelationCoefficients

julia&gt; haystack = rand(2^10,2^10);

Expand All @@ -14,7 +14,7 @@
needle3 = rand(1) .* haystack[end-6:end] .+ rand(1);</code></pre><p>you can preprocess the <code>haystack</code> to avoid redundant computations by precomputing all common information. There is no such preprocessing when using the direct method.</p><pre><code class="nohighlight hljs"> precomp = flcc(haystack,size(needle1));
</code></pre><p>Then use it for much faster queries.</p><pre><code class="nohighlight hljs"> best_correlated(flcc(precomp,needle1)) == 2
best_correlated(flcc(precomp,needle2)) == 42
best_correlated(flcc(precomp,needle3)) == 2^20-6</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/434a07dad4b88820a58314b4805cf2e8fd3ea112/src/flcc.jl#L31-L94">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}" href="#FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}"><code>FastLocalCorrelationCoefficients.lcc</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> lcc(haystack,needle)</code></pre><p>Calculate the local (Pearson) correlation coefficients between a <code>needle</code> and a sliding window within <code>haystack</code>, directly.</p><p><strong>Example</strong></p><p>Suppose you have a <code>haystack</code>, a tensor of reals and a <code>needle</code>, a smaller tensor of the same dimensionality that you are are trying to locate in the <code>haystack</code>. Note that the <code>needle</code> might be scaled and translated.</p><p>The position of the maximum LCC is the best match between the <code>needle</code> and a sliding window of <code>haystack</code></p><pre><code class="language-julia-repl hljs">julia&gt; using FastLocalCorrelationCoefficients
best_correlated(flcc(precomp,needle3)) == 2^20-6</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/1a9d4fb89c84d507730689e1a85f33947c526eaa/src/flcc.jl#L31-L94">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}" href="#FastLocalCorrelationCoefficients.lcc-Tuple{Any, Any}"><code>FastLocalCorrelationCoefficients.lcc</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs"> lcc(haystack,needle)</code></pre><p>Calculate the local (Pearson) correlation coefficients between a <code>needle</code> and a sliding window within <code>haystack</code>, directly.</p><p><strong>Example</strong></p><p>Suppose you have a <code>haystack</code>, a tensor of reals and a <code>needle</code>, a smaller tensor of the same dimensionality that you are are trying to locate in the <code>haystack</code>. Note that the <code>needle</code> might be scaled and translated.</p><p>The position of the maximum LCC is the best match between the <code>needle</code> and a sliding window of <code>haystack</code></p><pre><code class="language-julia-repl hljs">julia&gt; using FastLocalCorrelationCoefficients

julia&gt; haystack = rand(2^10,2^10);

Expand All @@ -23,4 +23,4 @@
julia&gt; c = lcc(haystack,needle);

julia&gt; best_correlated(c)
CartesianIndex(42, 45)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/434a07dad4b88820a58314b4805cf2e8fd3ea112/src/flcc.jl#L187-L216">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../waldo/">« Where&#39;s Waldo?</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="Friday 1 December 2023 10:19">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
CartesianIndex(42, 45)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/pitsianis/FastLocalCorrelationCoefficients.jl/blob/1a9d4fb89c84d507730689e1a85f33947c526eaa/src/flcc.jl#L187-L216">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../waldo/">« Where&#39;s Waldo?</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 28 December 2023 03:17">Thursday 28 December 2023</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit a91ae0a

Please sign in to comment.