(html (head (title "sph-lib (sph vector selection)") (link (@ (rel "stylesheet") (type "text/css") (href "/css/sph.css"))) (meta (@ (name "viewport") (content "width=device-width,initial-scale=1"))) #f) (body () (div (@ (class top)) (nav (a (@ (href "/")) "start") ", " (a (@ (href "/feed.xml")) "feed")) "") (div (@ (class "middle")) (div (@ (class mtime) (title "last modification time of the current page")) "2019-03-10") (section (h1 "(sph vector selection)") (div (p "create and analyse selections from sets: permutations, combinations, n-tuples") (p "part of " (a (@ (href "../../sph-lib.html")) "sph-lib")) (#f (section (@ (class "library-name")) (h1 "import name") (p "(sph vector selection)")) (section (@ (class "library-exports")) (h1 "exports") (div (ul (@ (class "doc-index")) (li (a (@ (href "#doc-b-" "sph-vector-selection-description") (class (variable))) "sph-vector-selection-description")) (li (a (@ (href "#doc-b-" "vector-distinct-count") (class (procedure))) "vector-distinct-count")) (li (a (@ (href "#doc-b-" "vector-distinct-maximum") (class (procedure))) "vector-distinct-maximum")) (li (a (@ (href "#doc-b-" "vector-distinct-stream") (class (procedure))) "vector-distinct-stream")) (li (a (@ (href "#doc-b-" "vector-numeric-increment-be") (class (procedure))) "vector-numeric-increment-be")) (li (a (@ (href "#doc-b-" "vector-numeric-increment-be!") (class (procedure))) "vector-numeric-increment-be!")) (li (a (@ (href "#doc-b-" "vector-numeric-increment-le") (class (procedure))) "vector-numeric-increment-le")) (li (a (@ (href "#doc-b-" "vector-numeric-increment-le!") (class (procedure))) "vector-numeric-increment-le!")) (li (a (@ (href "#doc-b-" "vector-selection") (class (procedure))) "vector-selection")) (li (a (@ (href "#doc-b-" "vector-selection-maximum") (class (procedure))) "vector-selection-maximum")) (li (a (@ (href "#doc-b-" "vector-selections") (class (procedure))) "vector-selections")) (li (a (@ (href "#doc-b-" "vector-selections-stream") (class (procedure))) "vector-selections-stream"))) (div (@ (class "doc-bindings")) (div (@ (id "doc-b-" "sph-vector-selection-description") (class "doc-b")) (div (span (@ (class "type")) "variable") ": " (span (@ (class "name")) "sph-vector-selection-description")) "" "") (div (@ (id "doc-b-" "vector-distinct-count") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-distinct-count") " " (span (@ (class "first-sig")) "a [min-width max-width] ->")) (div (@ (class "rest-sig")) (div "vector integer integer -> integer")) (div (@ (class "description")) (("count all distinct sub-vectors in a vector with lengths from min-width to max-width." (br) "distinctness is defined by elements, order and length")))) (div (@ (id "doc-b-" "vector-distinct-maximum") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-distinct-maximum") " " (span (@ (class "first-sig")) "width [min-width] ->")) (div (@ (class "rest-sig")) (div "integer integer -> integer")) (div (@ (class "description")) (("calculate the maximum number of possible distinct tuples in a tuple up to width, optionally ignoring widths smaller than min-width")))) (div (@ (id "doc-b-" "vector-distinct-stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-distinct-stream") " " (span (@ (class "first-sig")) "a [min-width max-width] ->")) (div (@ (class "rest-sig")) (div "vector [integer integer] -> stream")) (div (@ (class "description")) (("return a stream of all distinct sub-vectors in a vector with lengths from min-width to max-width." (br) "top to bottom." (br) "distinctness is defined as with vector-distinct-count")))) (div (@ (id "doc-b-" "vector-numeric-increment-be") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-numeric-increment-be") " " (span (@ (class "first-sig")) "a base ->")) (div (@ (class "rest-sig")) (div "vector integer -> vector")) (div (@ (class "description")) (("treat integers in a vector as digits of a number to \"base\" and increment it." (br) "the least significant digit is the last element of the vector." (br) "returns false if the maximum value has been reached")))) (div (@ (id "doc-b-" "vector-numeric-increment-be!") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-numeric-increment-be!") " " (span (@ (class "first-sig")) "a base ->")) (div (@ (class "rest-sig")) (div "vector integer -> true/false")) (div (@ (class "description")) (("like \"vector-numeric-increment-be\" but modifies the input vector")))) (div (@ (id "doc-b-" "vector-numeric-increment-le") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-numeric-increment-le") " " (span (@ (class "first-sig")) "a base ->")) (div (@ (class "rest-sig")) (div "vector integer -> vector")) (div (@ (class "description")) (("treat integers in a vector as digits of a number to \"base\" and increment it." (br) "the least significant digit is the first element of the vector." (br) "return false if the maximum value has been reached")))) (div (@ (id "doc-b-" "vector-numeric-increment-le!") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-numeric-increment-le!") " " (span (@ (class "first-sig")) "a base ->")) (div (@ (class "rest-sig")) (div "vector integer -> true/false")) (div (@ (class "description")) (("like \"vector-numeric-increment-le\" but modifies the input vector")))) (div (@ (id "doc-b-" "vector-selection") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-selection") " " (span (@ (class "first-sig")) "set-indices set ->")) (div (@ (class "rest-sig")) (div "vector:#(integer ...) vector -> vector")) (div (@ (class "description")) (("return a new vector of values at indices in set")))) (div (@ (id "doc-b-" "vector-selection-maximum") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-selection-maximum") " " (span (@ (class "first-sig")) "set-length [selection-width] ->")) (div (@ (class "rest-sig")) (div "integer integer -> integer")) (div (@ (class "description")) (("calculate the maximum number of possible distinct selections from a set with length \"set-length\" and" (br) "optional \"selection-width\" which defaults to \"set-length\"")))) (div (@ (id "doc-b-" "vector-selections") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-selections") " " (span (@ (class "first-sig")) "set [width] ->")) (div (@ (class "rest-sig")) (div "vector integer -> (vector ...)")) (div (@ (class "description")) (("return a list of all distinct selections of values from \"set\" with duplicate elements allowed. set can contain any datatype." (br) "the optional parameter \"width\" specifies the length of selections." (br) "for example, a width of two creates all possible two element selections of set." (br) "the default for \"width\" is the length of the set")))) (div (@ (id "doc-b-" "vector-selections-stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "vector-selections-stream") " " (span (@ (class "first-sig")) "selection [width] ->")) (div (@ (class "rest-sig")) (div "vector width -> stream")) (div (@ (class "description")) (("like vector-selections but returns an srfi-41-stream and calculates next results on demand"))))))))))) ()))