Skip to content

jw3126/SimpleSparseArrays.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleSparseArrays

Build Status codecov.io

Arbitrary dimension sparse arrays. See also here.

Usage

SimpleSparseArray is a subtype of AbstractArray and hence it should work as a drop in replacement for your arrays.

julia> using SimpleSparseArrays

julia> arr3d = SimpleSparseArray{Float64}(2,3,4)
2×3×4 SimpleSparseArray{Float64,3}:
[:, :, 1] =
 0.0  0.0  0.0
 0.0  0.0  0.0

[:, :, 2] =
 0.0  0.0  0.0
 0.0  0.0  0.0

[:, :, 3] =
 0.0  0.0  0.0
 0.0  0.0  0.0

[:, :, 4] =
 0.0  0.0  0.0
 0.0  0.0  0.0

julia> arr3d[1,1,1] = 10
10

julia> arr3d[1,1,2] = 20
20

julia> sum(arr3d)
30.0

Design goals

Design goals ordered by priority:

  • Must work in arbitrary dimensions
  • Simple implementation
  • Performance

About

Simple arbitrary dimension sparse arrays

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages