PreviousUpNext

14.4.91  Setxy

The standard library Setx api defines an interface for set implementations with two type parameters (’X’, ’Y’).

The Setxy api is implemented by the red_black_setxy_g package.

The Setxy api source code is in src/lib/src/setxy.api. The above information is manually maintained and may contain errors.

api {   package key
          : api {
                Key (X, Y);
                compare : (Key((X, Y)) , Key((X, Y))) -> Order;};;
    Item (X, Y) = key::Key((X, Y));
    Set (X, Y);
    empty : Set((X, Y));
    singleton : Item((X, Y)) -> Set((X, Y));
    add : (Set((X, Y)) , Item((X, Y))) -> Set((X, Y));
    add' : (Item((X, Y)) , Set((X, Y))) -> Set((X, Y));
    add_list : (Set((X, Y)) , List(Item((X, Y)) )) -> Set((X, Y));
    drop : (Set((X, Y)) , Item((X, Y))) -> Set((X, Y));
    member : (Set((X, Y)) , Item((X, Y))) -> Bool;
    is_empty : Set((X, Y)) -> Bool;
    equal : (Set((X, Y)) , Set((X, Y))) -> Bool;
    compare : (Set((X, Y)) , Set((X, Y))) -> Order;
    is_subset : (Set((X, Y)) , Set((X, Y))) -> Bool;
    vals_count : Set((X, Y)) -> Int;
    vals_list : Set((X, Y)) -> List(Item((X, Y)) );
    union : (Set((X, Y)) , Set((X, Y))) -> Set((X, Y));
    intersection : (Set((X, Y)) , Set((X, Y))) -> Set((X, Y));
    difference : (Set((X, Y)) , Set((X, Y))) -> Set((X, Y));
    map : (Item((X, Y)) -> Item((X, Y))) -> Set((X, Y)) -> Set((X, Y));
    apply : (Item((X, Y)) -> Void) -> Set((X, Y)) -> Void;
    fold_forward : ((Item((X, Y)) , Y) -> Y) -> Y -> Set((X, Y)) -> Y;
    fold_backward : ((Item((X, Y)) , Y) -> Y) -> Y -> Set((X, Y)) -> Y;
    partition : (Item((X, Y)) -> Bool) -> Set((X, Y)) -> (Set((X, Y)) , Set((X, Y)));
    filter : (Item((X, Y)) -> Bool) -> Set((X, Y)) -> Set((X, Y));
    exists : (Item((X, Y)) -> Bool) -> Set((X, Y)) -> Bool;
    find : (Item((X, Y)) -> Bool) -> Set((X, Y)) -> Null_Or(Item((X, Y)) );
    all_invariants_hold : Set((X, Y)) -> Bool;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext