Skip to content

haampie/StructuredGrids.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

StructuredGrids.jl

Tiny package for lazy structured grids:

julia> using StructuredGrids

julia> g = grid(-2:2, 1:3)
5×3 StructuredGrid.Grid{Tuple{Int64,Int64},2,Tuple{UnitRange{Int64},UnitRange{Int64}}}:
 (-2, 1)  (-2, 2)  (-2, 3)
 (-1, 1)  (-1, 2)  (-1, 3)
 (0, 1)   (0, 2)   (0, 3) 
 (1, 1)   (1, 2)   (1, 3) 
 (2, 1)   (2, 2)   (2, 3)
 
 julia> g[2,2]
 (-1, 2)

It's more or less the same as Iterators.product(-2:2, 1:3), but it allows indexing as well and subtypes AbstractArray.

About

A tiny package for structured grids in Julia

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages