Methods list
LazyGrids.LazyGridsLazyGrids.AbstractGridLazyGrids.GridARLazyGrids.GridAVLazyGrids.GridOTLazyGrids.GridSLLazyGrids.GridURLazyGrids.btimeLazyGrids.ndgridLazyGrids.ndgridLazyGrids.ndgrid_arrayLazyGrids.@timeo
Methods usage
LazyGrids.LazyGrids — ModuleLazyGridsModule for representing grids in a lazy way.
LazyGrids.AbstractGrid — TypeAbstractGrid{T,d,D} <: AbstractArray{T,D}Abstract type for representing the dth component of of a D-dimensional ndgrid(v₁, v₂, ...) where 1 ≤ d ≤ D and where eltype(v_d) = T.
LazyGrids.GridAR — TypeGridAR{T,d,D,S} <: AbstractGrid{T,d,D}The dth component of D-dimensional ndgrid(v₁, v₂, ...) where 1 ≤ d ≤ D and v_d is an AbstractRange.
LazyGrids.GridAV — TypeGridAV{T,d,D} <: AbstractGrid{T,d,D}The dth component of D-dimensional ndgrid(v₁, v₂, ...) where 1 ≤ d ≤ D and v_d is an AbstractVector.
LazyGrids.GridOT — TypeGridOT{T,d,D} <: AbstractArray{T,D}The dth component of D-dimensional ndgrid(1:M, 1:N, ...) where 1 ≤ d ≤ D.
LazyGrids.GridSL — TypeGridSL{T,d,D} <: AbstractGrid{T,d,D}The dth component of D-dimensional ndgrid(v₁, v₂, ...) where 1 ≤ d ≤ D and v_d is a StepRangeLen.
LazyGrids.GridUR — TypeGridUR{T,d,D} <: AbstractGrid{T,d,D}The dth component of D-dimensional ndgrid(a:b, c:d, ...) where 1 ≤ d ≤ D.
LazyGrids.btime — Methodbtime(t ; unit::Symbol, digits::Int)Pretty-print the @benchmark output for non-interactive use with Literate. Returns a string so that Literate will capture the output.
unitis:msby default, for reporting in ms. Or useμs.digitsis 1 by default.
LazyGrids.ndgrid — Method(xg, yg, ...) = ndgrid(M, N, ...)Shorthand for ndgrid(1:M, 1:N, ...).
Example
julia> ndgrid(2,3)
([1 1 1; 2 2 2], [1 2 3; 1 2 3])LazyGrids.ndgrid — Method(xg, yg, ...) = ndgrid(v1, v2, ...)Construct ndgrid tuple for AbstractVector inputs. Each output has a lazy grid type (subtype of AbstractGrid) according to the corresponding input vector type.
Examples
julia> xg, yg = ndgrid(1:3, [:a, :b])
([1 1; 2 2; 3 3], [:a :b; :a :b; :a :b])
julia> xg
3×2 LazyGrids.GridUR{Int64, 1, 2}:
1 1
2 2
3 3
julia> yg
3×2 LazyGrids.GridAV{Symbol, 2, 2, Vector{Symbol}}:
:a :b
:a :b
:a :bLazyGrids.ndgrid_array — Method(xg, yg, ...) = ndgrid_array(v1, v2, ...)Method to construct a tuple of (dense) Arrays from a set of vectors.
This tuple can use a lot of memory so should be avoided in general! It is provided mainly for testing and timing comparisons.
Each input should be an AbstractVector of some type. The corresponding output Array will have the same element type.
This method provides similar functionality as Matlab's ndarray function but is more general because the vectors can be any type.
Examples
julia> ndgrid_array(1:3, 1:2)
([1 1; 2 2; 3 3], [1 2; 1 2; 1 2])
julia> ndgrid(1:3, [:a,:b])
([1 1; 2 2; 3 3], [:a :b; :a :b; :a :b])LazyGrids.@timeo — Macro@timeoA version of @time that shows the timing only, not the computed values. Returns a string so that Literate will capture the output.