Giter VIP home page Giter VIP logo

simple-sds's Introduction

Simple succinct data structures

These structures are comparable to those in SDSL in performance and scalability. As the focus is on (relative) simplicity, ugly low-level optimizations are generally avoided.

Implemented functionality

Integer vectors

  • RawVector: A bit array that supports reading, writing, and appending 1-64 bits at a time. Implemented on top of Vec<u64>.
    • RawVectorWriter: An append-only version of RawVector that writes the structure directly to a file.
    • RawVectorMapper: An immutable memory-mapped RawVector.
  • IntVector: A bit-packed vector of fixed-width integers implemented on top of RawVector. Like sdsl::int_vector but also supports stack functionality.
    • IntVectorWriter: An append-only version of IntVector that writes the structure directly to a file. Like a subset of sdsl::int_vector_buffer.
    • IntVectorMapper: An immutable memory-mapped IntVector.
  • WaveletMatrix: An immutable vector of fixed-width integers. Similar to sdsl::wm_int.
    • Supports rank(), inverse_select(), select(), predecessor(), and successor() with each item value.
    • Iterators over all items and over items with a specified value.
    • Implemented using a BitVector for each level.

Bitvectors

  • BitVector: A plain immutable bitvector.
    • Supports rank(), rank_zero(), select(), select_zero(), predecessor(), and successor() queries using optional support structures.
    • Iterators over set bits, unset bits, and all bits.
    • Implemented on top of RawVector.
  • SparseVector: An Elias-Fano encoded bitvector.
    • Supports rank(), rank_zero(), select(), select_zero(), predecessor(), and successor() queries .
    • Iterators over set bits and all bits.
    • Space-efficient construction with SparseBuilder.

Planned functionality

Integer vectors

  • Mutable memory-mapped vectors.

Bitvectors

  • Versions of predecessor() and successor() that return values instead of iterators?
  • Slice-like functionality based on iterators?

Notes

  • The included .cargo/config.toml sets the target CPU to native.
  • This crate is designed for the x86_64 architecture with the BMI2 instruction set (Intel Haswell / AMD Excavator or later). Some operations may be slow without the POPCNT, LZCNT, TZCNT, and PDEP instructions.
  • 64-bit ARM is also supported.
  • Unix-like operating system is required for mmap().
  • Things may not work if the system is not little-endian or if usize is not 64-bit.

simple-sds's People

Contributors

jltsiren avatar

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.