首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > sbvj是一个简洁的位向量用java写的图书馆。

sbvj是一个简洁的位向量用java写的图书馆。

  • 资源大小:51.29 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: java 图书馆 简洁 一个 向量 sbvj

资 源 简 介

Summary sbvj is a library for succinct bit vector written in Java.The rank and select functions are defined as follows.Given a static bit vector B of bits numbered from 0 to n - 1, rank1_B(x): Counts the number of 1"s up to and excluding the position x in B. select1_B(y): Finds the position of the (y + 1)th 1bit in B. Requirement Java7 or later. Usage Simple/Dense rank in constant time select in O(lg(n)) time ``` // create succinct bit vector. SuccinctBitVector sbv = new SuccinctBitVector(10); // set bit. sbv.setBit(5, 1); // print bit vector. sbv.print(); // create auxiliary data structure. sbv.build(BuildType.SIMPLE); // get rank value. long rank = sbv.getRank(6, 1); // get select value. long select = sbv.getSelect(0, 1); // get serialized data. SuccinctBitVectorData sbvData = sbv.getData(); // get succi
VIP VIP
0.179851s