PreviousUpNext

15.3.540  src/lib/std/src/typelocked-matrix.api

## typelocked-matrix.api

# Compiled by:
#     src/lib/std/src/standard-core.sublib

# There do not appear to be any implementations of this API at present.



###                        "We are faced with the paradoxical fact that education has become
###                         one of the chief obstacles to intelligence and freedom of thought."
###
###                                                             -- Bertrand Russell



api Typelocked_Matrix {

    eqtype Array;
    Vector;
    Element;
    Region = {
        base:  Array,
        row:  Int, col:  Int,
        nrows:  Null_Or( Int ), ncols:  Null_Or( Int )
      };

    Traversal == rw_matrix::Traversal;

    rw_vector:  ((Int, Int, Element)) -> Array;
    from_list:  List( List( Element ) ) -> Array;
    tabulate:  Traversal -> ((Int, Int, (((Int, Int)) -> Element))) -> Array;
    get:  ((Array, Int, Int)) -> Element;
    set:  ((Array, Int, Int, Element)) -> Void;
    dimensions:  Array -> ((Int, Int));
    columns:  Array -> Int;
    rows:  Array -> Int;
    row:  ((Array, Int)) -> Vector;
    column:  ((Array, Int)) -> Vector;
    copy:  {
           src:  Region, dst:  Array, dst_row:  Int, dst_col:  Int
         } -> Void;

    keyed_apply:     Traversal -> (((Int, Int, Element)) -> Void) -> Region -> Void;
    apply:      Traversal -> (Element -> Void) -> Array -> Void;
    modifyi:  Traversal -> (((Int, Int, Element)) -> Element) -> Region -> Void;
    modify:   Traversal -> (Element -> Element) -> Array -> Void;
    foldi:    Traversal -> (((Int, Int, Element, X)) -> X) -> X -> Region -> X;
    fold:     Traversal -> (((Element, X)) -> X) -> X -> Array -> X;

  };




## COPYRIGHT (c) 1997 AT&T Research.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2012,
## released under Gnu Public Licence version 3.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext