PreviousUpNext

14.4.125  Typelocked_Rw_Vector

The standard library Typelocked_Rw_Vector api defines access to mutable vectors specialized to hold a particular element type such as Char.

The Typelocked_Rw_Vector api is implemented by the rw_vector_of_chars, rw_vector_of_one_byte_unts and rw_vector_of_eight_byte_floats packages.

Additional implementations of the Typelocked_Rw_Vector api may be generated using typelocked_rw_vector_g from src/lib/src/typelocked-rw-vector-g.pkg.

The Typelocked_Rw_Vector api source code is in src/lib/std/src/typelocked-rw-vector.api.

See also: Typelocked_Vector.

See also: Typelocked_Vector_Rw_Slice.

See also: Typelocked Vectors tutorial.

The above information is manually maintained and may contain errors.

api {
    eqtype Rw_Vector;
    Element;
    Vector;
    maximum_vector_length : Int;
    make_rw_vector : (Int , Element) -> Rw_Vector;
    from_list : List(Element ) -> Rw_Vector;
    from_fn : (Int , (Int -> Element)) -> Rw_Vector;
    length : Rw_Vector -> Int;
    get : (Rw_Vector , Int) -> Element;
    _[] : (Rw_Vector , Int) -> Element;
    set : (Rw_Vector , Int , Element) -> Void;
    _[]:= : (Rw_Vector , Int , Element) -> Void;
    to_vector : Rw_Vector -> Vector;
    copy : {at:Int, from:Rw_Vector, into:Rw_Vector} -> Void;
    copy_vector : {at:Int, from:Vector, into:Rw_Vector} -> Void;
    keyed_apply : ((Int , Element) -> Void) -> Rw_Vector -> Void;
    apply : (Element -> Void) -> Rw_Vector -> Void;
    keyed_map_in_place : ((Int , Element) -> Element) -> Rw_Vector -> Void;
    map_in_place : (Element -> Element) -> Rw_Vector -> Void;
    keyed_fold_forward : ((Int , Element , X) -> X) -> X -> Rw_Vector -> X;
    keyed_fold_backward : ((Int , Element , X) -> X) -> X -> Rw_Vector -> X;
    fold_forward : ((Element , X) -> X) -> X -> Rw_Vector -> X;
    fold_backward : ((Element , X) -> X) -> X -> Rw_Vector -> X;
    keyed_find : ((Int , Element) -> Bool) -> Rw_Vector -> Null_Or(((Int , Element)) );
    find : (Element -> Bool) -> Rw_Vector -> Null_Or(Element );
    exists : (Element -> Bool) -> Rw_Vector -> Bool;
    all : (Element -> Bool) -> Rw_Vector -> Bool;
    compare_sequences : ((Element , Element) -> Order) -> (Rw_Vector , Rw_Vector) -> Order;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext