;;;; sparse-vectors-module.scm (module sparse-vectors (;export ;required for record-variant, ugh sparse-vector hilbert-def ; make-sparse-vector sparse-vector? check-sparse-vector ;error-sparse-vector sparse-vector-count ; sparse-vector-ref *sparse-vector-ref sparse-vector-set! *sparse-vector-set! sparse-vector-unset! *sparse-vector-unset!) (import scheme (chicken base) (chicken type) (chicken bitwise) (chicken fixnum) record-variants) (include-relative "sparse-vectors.types") (: make-sparse-vector (#!optional * fixnum -> sparse-vector)) (: sparse-vector? (* -> boolean : sparse-vector)) (: check-sparse-vector (symbol * -> sparse-vector)) (: sparse-vector-count (sparse-vector -> fixnum)) (: *sparse-vector-ref (sparse-vector integer -> *)) (: *sparse-vector-set! (sparse-vector integer * -> void)) (: *sparse-vector-unset! (sparse-vector integer boolean -> void)) (: sparse-vector-ref (sparse-vector integer -> *)) (: sparse-vector-set! (sparse-vector integer * -> void)) (: sparse-vector-unset! (sparse-vector integer #!optional boolean -> void)) ;; (define sparse-vector 'sparse-vector) (define hilbert-def 'hilbert-def) (include-relative "sparse-vectors") ) ;module sparse-vectors