This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki NumericVectorsAdvancedCowan version 1

author

cowan

comment


    

ipnr

69.195.55.172

name

NumericVectorsAdvancedCowan

readonly

0

text

This page is an extension of NumericVectorsCowan that adds numeric vector versions of the following [http://srfi.schemers.org/srfi-43/srfi-43.html SRFI 43] procedures:

== Folds and unfolds ==

(<type>vector-fold kons knil bytevector1 bytevector2 ···) -> value

(<type>vector-fold kons knil bytevector1 bytevector2 ...) -> value

(<type>vector-unfold f length initial-seed ...) -> bytevector

(<type>vector-unfold-right f length initial-seed ...) -> bytevector

== Predicates ==

(<type>vector= = bytevector1 bytevector2 ...) -> boolean

== Iteration ==

(<type>vector-map! proc bytevector1 bytevector2 ...) -> unspecified

Similar to `<type>vector-map`, but rather than mapping the new elements into a new vector, the new mapped elements are destructively inserted into ``bytevector1``.  Returns an unspecified result.

(<type>vector-count predicate bytevector1 bytevector2 ...) -> exact nonnegative integer

Counts the number of parallel elements in the vectors that satisfy predicate, which is applied, for each index i in the range [0, length), where length is the length of the smallest vector argument, to i and each parallel element in the vectors at that index, in order. 

== Searching 

(<type>vector-index pred? bytevector1 bytevector2 ···) -> exact nonnegative integer or #f

(<type>vector-index-right pred? bytevector1 bytevector2 ···) -> exact nonnegative integer or #f

(<type>vector-skip pred? bytevector1 bytevector2 ...) -> exact nonnegative integer or #f

(<type>vector-skip-right pred? bytevector1 bytevector2 ...) -> exact nonnegative integer or #f

(<type>vector-binary-search bytevector value cmp) -> exact nonnegative integer or #f

(<type>vector-any pred? bytevector1 bytevector2 ···) -> value or #f

(<type>vector-every pred? bytevector1 bytevector2 ···) -> value or #f


== Swap == 

(<type>vector-swap! bytevector i j) -> unspecified

Exchanges the values of the locations in ''bytevector'', when viewed as a <type>vector, at indices ''i'' and ''j''.


== Reverse operations ==

(<type>vector-reverse! bytevector [start [end]]) -> unspecified

The `<type>vector-reverse-copy`, `<type>reverse-vector->vector`, `<type>reverse-vector->list`, `<type>reverse-list->vector`, and `<type>reverse-list->list` procedures are identical to their regular counterparts, but process the bytevector argument, when viewed as a <type>vector, in reverse order.  

time

2012-11-23 01:01:36

version

1