From 5bef4016bd540eff16a5529c1133f00d5bc247c9 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Thu, 17 Sep 2015 20:55:45 +0900 Subject: [PATCH] add a use case --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index b8a9242..fd93706 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,39 @@ The following two types are exported: In general, queries on `SucVector` is faster than those on `RRR`, but `RRR` is compressible. +Conversions from bit vectors are defined for these types. So you just pass a bit vector to them: + +``` +julia> using IndexableBitVectors + +julia> SucVector(bitrand(10)) +10-element IndexableBitVectors.SucVector: + false + false + false + false + true + true + false + false + false + true + +julia> RRR(bitrand(10)) +10-element IndexableBitVectors.RRR: + false + false + false + false + true + false + false + false + true + false + +``` + ## Benchmarks: The script and result of benchmarks can be found in the [benchmarks](./benchmarks)