package fast_bitvector

  1. Overview
  2. Docs

Module Fast_bitvector.BuilderSource

Sourcetype vector := t
Sourcetype t
Sourceval create : unit -> t

Create a new bitvector builder.

Sourceval push : t -> bool -> unit

Add a single bit to the bitvector (at the highest index).

Sourceval to_bitvector : t -> vector

Convert the builder to a bitvector. O(n).

Sourceval reset : t -> unit

Reset the builder, clearing all stored data

Sourceval add_iter : t -> ((bool -> unit) -> unit) -> t

Append an iterator to a builder.

Sourceval add_seq : t -> bool Seq.t -> t

Append a sequence to a builder.

Sourceval of_iter : ((bool -> unit) -> unit) -> t

Construct builder from an iterator.

Sourceval of_seq : bool Seq.t -> t

Construct build from a sequence.