Skip to content

Commit b8d60b5

Browse files
author
Documenter.jl
committed
build based on 945a9d1
1 parent 7165fac commit b8d60b5

14 files changed

Lines changed: 769 additions & 0 deletions

File tree

v2.30

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v2.30.0

v2.30.0/array_types/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Recursive Array Types · RecursiveArrayTools.jl</title><script async src="https://www.googletagmanager.com/gtag/js?id=UA-90474609-3"></script><script> window.dataLayer = window.dataLayer || [];
3+
function gtag(){dataLayer.push(arguments);}
4+
gtag('js', new Date());
5+
gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash});
6+
</script><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://recursivearraytools.sciml.ai/stable/array_types/"/><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><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">RecursiveArrayTools.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 class="is-active"><a class="tocitem" href>Recursive Array Types</a><ul class="internal"><li><a class="tocitem" href="#Abstract-Types"><span>Abstract Types</span></a></li><li><a class="tocitem" href="#Concrete-Types"><span>Concrete Types</span></a></li></ul></li><li><a class="tocitem" href="../recursive_array_functions/">Recursive Array Functions</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>Recursive Array Types</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Recursive Array Types</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/SciML/RecursiveArrayTools.jl/blob/master/docs/src/array_types.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="Recursive-Array-Types"><a class="docs-heading-anchor" href="#Recursive-Array-Types">Recursive Array Types</a><a id="Recursive-Array-Types-1"></a><a class="docs-heading-anchor-permalink" href="#Recursive-Array-Types" title="Permalink"></a></h1><p>The Recursive Array types are types which implement an <code>AbstractArray</code> interface so that recursive arrays can be handled with standard array functionality. For example, wrapped arrays will automatically do things like recurse broadcast, define optimized mapping and iteration functions, and more.</p><h2 id="Abstract-Types"><a class="docs-heading-anchor" href="#Abstract-Types">Abstract Types</a><a id="Abstract-Types-1"></a><a class="docs-heading-anchor-permalink" href="#Abstract-Types" title="Permalink"></a></h2><h2 id="Concrete-Types"><a class="docs-heading-anchor" href="#Concrete-Types">Concrete Types</a><a id="Concrete-Types-1"></a><a class="docs-heading-anchor-permalink" href="#Concrete-Types" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="RecursiveArrayTools.VectorOfArray" href="#RecursiveArrayTools.VectorOfArray"><code>RecursiveArrayTools.VectorOfArray</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">VectorOfArray(u::AbstractVector)</code></pre><p>A <code>VectorOfArray</code> is an array which has the underlying data structure <code>Vector{AbstractArray{T}}</code> (but, hopefully, concretely typed!). This wrapper over such data structures allows one to lazily act like it&#39;s a higher-dimensional vector, and easily convert to different forms. The indexing structure is:</p><pre><code class="language-julia hljs">A[i] # Returns the ith array in the vector of arrays
7+
A[j,i] # Returns the jth component in the ith array
8+
A[j1,...,jN,i] # Returns the (j1,...,jN) component of the ith array</code></pre><p>which presents itself as a column-major matrix with the columns being the arrays from the vector. The <code>AbstractArray</code> interface is implemented, giving access to <code>copy</code>, <code>push</code>, <code>append!</code>, etc. functions, which act appropriately. Points to note are:</p><ul><li>The length is the number of vectors, or <code>length(A.u)</code> where <code>u</code> is the vector of arrays.</li><li>Iteration follows the linear index and goes over the vectors</li></ul><p>Additionally, the <code>convert(Array,VA::AbstractVectorOfArray)</code> function is provided, which transforms the <code>VectorOfArray</code> into a matrix/tensor. Also, <code>vecarr_to_vectors(VA::AbstractVectorOfArray)</code> returns a vector of the series for each component, that is, <code>A[i,:]</code> for each <code>i</code>. A plot recipe is provided, which plots the <code>A[i,:]</code> series.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/RecursiveArrayTools.jl/blob/945a9d1e9c1db7a3c009df95ce66cca79e6bacbf/src/vector_of_array.jl#L3-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="RecursiveArrayTools.DiffEqArray" href="#RecursiveArrayTools.DiffEqArray"><code>RecursiveArrayTools.DiffEqArray</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">DiffEqArray(u::AbstractVector,t::AbstractVector)</code></pre><p>This is a <code>VectorOfArray</code>, which stores <code>A.t</code> that matches <code>A.u</code>. This will plot <code>(A.t[i],A[i,:])</code>. The function <code>tuples(diffeq_arr)</code> returns tuples of <code>(t,u)</code>.</p><p>To construct a DiffEqArray</p><pre><code class="language-julia hljs">t = 0.0:0.1:10.0
9+
f(t) = t - 1
10+
f2(t) = t^2
11+
vals = [[f(tval) f2(tval)] for tval in t]
12+
A = DiffEqArray(vals, t)
13+
A[1,:] # all time periods for f(t)
14+
A.t</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/RecursiveArrayTools.jl/blob/945a9d1e9c1db7a3c009df95ce66cca79e6bacbf/src/vector_of_array.jl#L36-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="RecursiveArrayTools.ArrayPartition" href="#RecursiveArrayTools.ArrayPartition"><code>RecursiveArrayTools.ArrayPartition</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ArrayPartition(x::AbstractArray...)</code></pre><p>An <code>ArrayPartition</code> <code>A</code> is an array, which is made up of different arrays <code>A.x</code>. These index like a single array, but each subarray may have a different type. However, broadcast is overloaded to loop in an efficient manner, meaning that <code>A .+= 2.+B</code> is type-stable in its computations, even if <code>A.x[i]</code> and <code>A.x[j]</code> do not match types. A full array interface is included for completeness, which allows this array type to be used in place of a standard array where such a type stable broadcast may be needed. One example is in heterogeneous differential equations for <a href="https://github.com/JuliaDiffEq/DifferentialEquations.jl">DifferentialEquations.jl</a>.</p><p>An <code>ArrayPartition</code> acts like a single array. <code>A[i]</code> indexes through the first array, then the second, etc., all linearly. But <code>A.x</code> is where the arrays are stored. Thus, for:</p><pre><code class="language-julia hljs">using RecursiveArrayTools
15+
A = ArrayPartition(y,z)</code></pre><p>we would have <code>A.x[1]==y</code> and <code>A.x[2]==z</code>. Broadcasting like <code>f.(A)</code> is efficient.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/RecursiveArrayTools.jl/blob/945a9d1e9c1db7a3c009df95ce66cca79e6bacbf/src/array_partition.jl#L1-L25">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../recursive_array_functions/">Recursive Array Functions »</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="Monday 22 December 2025 23:18">Monday 22 December 2025</span>. Using Julia version 1.12.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)