PreviousUpNext

14.4.4  Bool_Vector

The standard library Bool_Vector api defines immutable vectors of Bools. (For mutable bitvectors see the Rw_Bool_Vector API.)

The Bool_Vector api is not separately implemented: See the src/lib/src/bool-vector.pkg.

The Bool_Vector api source code is in src/lib/src/bool-vector.api.

The above information is manually maintained and may contain errors.

api {
    Vector;
    Element  = Bool;
    maximum_vector_length : Int;
    from_list : List(Element ) -> Vector;
    from_fn : (Int , (Int -> Element)) -> Vector;
    length : Vector -> Int;
    cat : List(Vector ) -> Vector;
    get : (Vector , Int) -> Element;
    _[] : (Vector , Int) -> Element;
    set : (Vector , Int , Element) -> Vector;
    _[]:= : (Vector , Int , Element) -> Vector;
    keyed_apply : ((Int , Element) -> Void) -> Vector -> Void;
    apply : (Element -> Void) -> Vector -> Void;
    keyed_map : ((Int , Element) -> Element) -> Vector -> Vector;
    map : (Element -> Element) -> Vector -> Vector;
    keyed_fold_forward : ((Int , Element , X) -> X) -> X -> Vector -> X;
    keyed_fold_backward : ((Int , Element , X) -> X) -> X -> Vector -> X;
    fold_forward : ((Element , X) -> X) -> X -> Vector -> X;
    fold_backward : ((Element , X) -> X) -> X -> Vector -> X;
    keyed_find : ((Int , Element) -> Bool) -> Vector -> Null_Or(((Int , Element)) );
    find : (Element -> Bool) -> Vector -> Null_Or(Element );
    exists : (Element -> Bool) -> Vector -> Bool;
    all : (Element -> Bool) -> Vector -> Bool;
    compare_sequences : ((Element , Element) -> Order) -> (Vector , Vector) -> Order;
    from_string : String -> Vector;
    bits : (Int , List(Int )) -> Vector;
    get_bits : Vector -> List(Int );
    to_string : Vector -> String;
    is_zero : Vector -> Bool;
    extend0 : (Vector , Int) -> Vector;
    extend1 : (Vector , Int) -> Vector;
    eq_bits : (Vector , Vector) -> Bool;
    equal : (Vector , Vector) -> Bool;
    bitwise_and : (Vector , Vector , Int) -> Vector;
    bitwise_or : (Vector , Vector , Int) -> Vector;
    bitwise_xor : (Vector , Vector , Int) -> Vector;
    bitwise_not : Vector -> Vector;
    lshift : (Vector , Int) -> Vector;
    rshift : (Vector , Int) -> Vector;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext