Coder Social home page Coder Social logo

jamshed / implementation-of-some-succint-primitives Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 581 KB

Implementation of: an efficient basic bitvector library with constant-time set and get words; a succint, constant-time bit-vector rank-support data structure; a succint, logarithmic-time bit-vector select-support data structure; and wavelet tree construction on arbitrary texts, with serialization, access, rank, and select query support.

C++ 100.00%
wavelet-tree rank-select bitvector-library

implementation-of-some-succint-primitives's Introduction

Implementation of Some Succint Primitives

Overview

Implementation of: an efficient basic bitvector library with constant-time set and get words, a succint, constant-time bit-vector rank-support data structure, a succint, logarithmic-time bit-vector select-support data structure, and wavelet tree construction on arbitrary texts, with serialization, access, rank, and select query support.

Compile

g++ -std=c++11 wt.cpp -o wt

API

  • ./wt build <input file> <output file>: builds a wavelet tree from the line of text at file <input file>, and serializes the built tree to the <output file>
  • ./wt access <saved wt> <access indices>: Loads a wavelet tree from the file <saved wt> and issues a series of access queries on the contents of the file <access indices>. <access indices> is a file containing a newline-separated list of indices (0-based) to access. The characters in the original text on which the wavelet tree is built upon corresponding to each index in the file <access indices> displayed to standard out.
  • ./wt rank <saved wt> <rank queries>: Loads a wavelet tree from the file <saved wt> and issues a series of rank queries on the contents of the file <rank queries>. <rank queries> is a file containing a newline-separated list of rank queries to issue. Each rank query is of the format <c>\t<i>, where <c> is some character from the alphabet of the original string, <i> is some index and \t is the tab character. The program reports the answers to the rank queries (one per-line) to standard out.
  • ./wt select <saved wt> <select queries>: Loads a wavelet tree from the file <saved wt> and issues a series of select queries on the contents of the file <select queries>. <select queries> is a file containing a newline-separated list of select queries to issue. Each select query is of the format <c>\t<i>, where <c> is some character from the alphabet of the original string, <i> is the occurrence of the character we wish to query, and \t is the tab character. The program reports the answers to the select queries (one per-line) to standard out.

implementation-of-some-succint-primitives's People

Watchers

 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.