@@ -17,8 +17,8 @@ VectorOfArray(u::AbstractVector)
1717```
1818
1919A ` VectorOfArray ` is an array which has the underlying data structure ` Vector{AbstractArray{T}} `
20- (but hopefully concretely typed!). This wrapper over such data structures allows one to lazily
21- act like it's a higher dimensional vector, and easily convert to different forms. The indexing
20+ (but, hopefully, concretely typed!). This wrapper over such data structures allows one to lazily
21+ act like it's a higher- dimensional vector, and easily convert to different forms. The indexing
2222structure is:
2323
2424``` julia
@@ -28,16 +28,16 @@ A[j1,...,jN,i] # Returns the (j1,...,jN) component of the ith array
2828```
2929
3030which presents itself as a column-major matrix with the columns being the arrays from the vector.
31- The ` AbstractArray ` interface is implemented, giving access to ` copy ` , ` push ` , ` append! ` , etc. function
32- which act appropriate . Points to note are:
31+ The ` AbstractArray ` interface is implemented, giving access to ` copy ` , ` push ` , ` append! ` , etc. functions,
32+ which act appropriately . Points to note are:
3333
3434- The length is the number of vectors, or ` length(A.u) ` where ` u ` is the vector of arrays.
3535- Iteration follows the linear index and goes over the vectors
3636
37- Additionally, the ` convert(Array,VA::AbstractVectorOfArray) ` function is provided which transforms
37+ Additionally, the ` convert(Array,VA::AbstractVectorOfArray) ` function is provided, which transforms
3838the ` VectorOfArray ` into a matrix/tensor. Also, ` vecarr_to_vectors(VA::AbstractVectorOfArray) `
39- returns a vector of the series for each component, that is ` A[i,:] ` for each ` i ` .
40- A plot recipe is provided which plots the ` A[i,:] ` series.
39+ returns a vector of the series for each component, that is, ` A[i,:] ` for each ` i ` .
40+ A plot recipe is provided, which plots the ` A[i,:] ` series.
4141
4242#### DiffEqArray
4343
@@ -47,7 +47,7 @@ Related to the `VectorOfArray` is the `DiffEqArray`
4747DiffEqArray (u:: AbstractVector ,t:: AbstractVector )
4848```
4949
50- This is a ` VectorOfArray ` which stores ` A.t ` which matches ` A.u ` . This will plot
50+ This is a ` VectorOfArray ` , which stores ` A.t ` that matches ` A.u ` . This will plot
5151` (A.t[i],A[i,:]) ` . The function ` tuples(diffeq_arr) ` returns tuples of ` (t,u) ` .
5252
5353To construct a DiffEqArray
6767ArrayPartition (x:: AbstractArray... )
6868```
6969
70- An ` ArrayPartition ` ` A ` is an array which is made up of different arrays ` A.x ` .
70+ An ` ArrayPartition ` ` A ` is an array, which is made up of different arrays ` A.x ` .
7171These index like a single array, but each subarray may have a different type.
7272However, broadcast is overloaded to loop in an efficient manner, meaning that
7373` A .+= 2.+B ` is type-stable in its computations, even if ` A.x[i] ` and ` A.x[j] `
7474do not match types. A full array interface is included for completeness, which
75- allows this array type to be used in place of a standard array in places where
75+ allows this array type to be used in place of a standard array where
7676such a type stable broadcast may be needed. One example is in heterogeneous
7777differential equations for [ DifferentialEquations.jl] ( https://github.com/JuliaDiffEq/DifferentialEquations.jl ) .
7878
7979An ` ArrayPartition ` acts like a single array. ` A[i] ` indexes through the first
80- array, then the second, etc. all linearly. But ` A.x ` is where the arrays are stored.
81- Thus for
80+ array, then the second, etc., all linearly. But ` A.x ` is where the arrays are stored.
81+ Thus, for:
8282
8383``` julia
8484using RecursiveArrayTools
8585A = ArrayPartition (y,z)
8686```
8787
88- We would have ` A.x[1]==y ` and ` A.x[2]==z ` . Broadcasting like ` f.(A) ` is efficient.
88+ we would have ` A.x[1]==y ` and ` A.x[2]==z ` . Broadcasting like ` f.(A) ` is efficient.
8989
9090### Functions
9191
@@ -100,9 +100,9 @@ like `copy!` on arrays of scalars.
100100convert (Array,vecvec)
101101```
102102
103- Technically just a Base fallback that works well. Takes in a vector of arrays,
103+ Technically, just a Base fallback that works well. Takes in a vector of arrays,
104104returns an array of dimension one greater than the original elements.
105- Works on ` AbstractVectorOfArray ` . If the ` vecvec ` is ragged, i.e. not all of the
105+ Works on ` AbstractVectorOfArray ` . If the ` vecvec ` is ragged, i.e., not all of the
106106elements are the same, then it uses the size of the first element to determine
107107the conversion.
108108
@@ -116,18 +116,18 @@ Calls `f` on each element of a vecvec `v`.
116116copyat_or_push! {T} (a:: AbstractVector{T} ,i:: Int ,x)
117117```
118118
119- If ` i<length(x) ` , it's simply a ` recursivecopy! ` to the ` i ` th element. Otherwise it will
119+ If ` i<length(x) ` , it's simply a ` recursivecopy! ` to the ` i ` th element. Otherwise, it will
120120` push! ` a ` deepcopy ` .
121121
122122``` julia
123123recursive_one (a)
124124```
125125
126- Calls ` one ` on the bottom container to get the "true element one type"
126+ Calls ` one ` on the bottom container to get the "true element one type".
127127
128128``` julia
129129mean {T<:AbstractArray} (vecvec:: Vector{T} )
130130mean {T<:AbstractArray} (matarr:: Matrix{T} ,region= 0 )
131131```
132132
133- Generalized mean functions for vectors of arrays and matrix of arrays.
133+ Generalized mean functions for vectors of arrays and a matrix of arrays.
0 commit comments