Code Monkey home page Code Monkey logo

persistentarrays.jl's Introduction

PersistentArrays.jl

Build Status codecov.io

Fat node implementation of a persistent array, which in this case is just stored as an array of arrays. This datastructure is ideal when you need to store multiple versions of an array, but the elements in the array are rarely changing.

Usage:

Please see the test cases for common usage here.

Complexity:

Summary Table of method complexity per element selected.

Method Complexity
setindex!(a, x, i...) O(m)
getindex(a, i...) O(1)
update!(a, x, v, i...) O(mlog(m))
lookup(a, v, i...) O(log(m))

The space complexity is O(n x m) where n is the number of elements and m is the number of versions. This worst case scenario could occur if all elements in the array change for every version.

persistentarrays.jl's People

Contributors

rofinn avatar

Watchers

 avatar  avatar

Forkers

juliatagbot

persistentarrays.jl's Issues

REPL show

Looks like overloading Base.show for subtypes of AbstractArray doesn't work for displaying the array in the REPL. This probably just requires some searching, but it isn't a big priority.

100% coverage

Currently, not testing 3 lines of code 2 are error conditions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.