au.csiro.variantspark.work.BitsetTest.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of variant-spark_2.11 Show documentation
Show all versions of variant-spark_2.11 Show documentation
Genomic variants interpretation toolkit
The newest version!
package au.csiro.variantspark.work
import scala.collection.immutable.BitSet
import scala.collection.mutable.{BitSet => MBitSet}
object BitsetTest {
def main(args: Array[String]) {
val ordinalValues = Array(1, 2, 3, 4, 1, 0, 10)
val builder = BitSet.newBuilder
builder.sizeHint(ordinalValues.length)
ordinalValues.foreach(builder.+=)
val set = builder.result()
set.foreach(println)
val mset = MBitSet()
mset ++= ordinalValues
mset.foreach(println)
}
}