Changes between Version 1 and Version 2 of NumericVectorsAdvancedCowan
 Timestamp:
 11/22/12 16:01:16 (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

NumericVectorsAdvancedCowan
v1 v2 3 3 == Folds and unfolds == 4 4 5 (<type>vectorfold kons knil bytevector1 bytevector2 ···)> value5 `(<type>vectorfold `''kons knil bytevector1 bytevector2'' ...`)` > value 6 6 7 (<type>vectorfold kons knil bytevector1 bytevector2 ...)> value7 `(<type>vectorfold `''kons knil bytevector1 bytevector2'' ...`)` > value 8 8 9 (<type>vectorunfold f length initialseed ...)> bytevector9 `(<type>vectorunfold `''proc length initialseed'' ...`)` > bytevector 10 10 11 (<type>vectorunfoldright f length initialseed ...)> bytevector11 `(<type>vectorunfoldright `''proc length initialseed'' ...`)` > bytevector 12 12 13 13 == Predicates == 14 14 15 (<type>vector= = bytevector1 bytevector2 ...)> boolean15 `(<type>vector= `''= bytevector1 bytevector2'' ...`)` > boolean 16 16 17 17 == Iteration == 18 18 19 (<type>vectormap! proc bytevector1 bytevector2 ...) > unspecified 19 `(<type>vectormap! `''proc bytevector1 bytevector2'' ...`)` 20 20 21 Similar to `<type>vectormap`, but rather than mapping the new elements into a new vector, the new mapped elements are destructively inserted into ``bytevector1``. Returns an unspecified result.21 Similar to `<type>vectormap`, but rather than mapping the new elements into a newly allocated bytevector, the results are destructively inserted into ``bytevector1``. Returns an unspecified value. Returns an unspecified value. 22 22 23 (<type>vectorcount predicate bytevector1 bytevector2 ...) > exact nonnegative integer 23 `(<type>vectorcount `''predicate bytevector1 bytevector2'' ...`)` 24 24 25 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.25 Counts the number of parallel elements in the bytevectors, when viewed as <type>vectors</i>, that satisfy ''predicate'', and returns the count as an exact nonnegative integer. The procedure is applied for each index ''i'' in the range from 0 (inclusive) to ''length'' (exclusive), where ''length'' is the length of the smallest bytevector argument, to ''i'' and the ''i''th element in each bytevector when viewed as a <type>vector, in order. 26 26 27 == Searching 27 == Searching == 28 28 29 (<type>vectorindex pred? bytevector1 bytevector2 ···) > exact nonnegative integer or #f 29 `(<type>vectorindex `''predicate bytevector1 bytevector2'' ...`)` > exact nonnegative integer or `#f` 30 30 31 (<type>vectorindexright pred? bytevector1 bytevector2 ···) > exact nonnegative integer or #f 31 `(<type>vectorindexright `''predicate bytevector1 bytevector2'' ...`)` > exact nonnegative integer or `#f` 32 32 33 (<type>vectorskip pred? bytevector1 bytevector2 ...) > exact nonnegative integer or #f 33 `(<type>vectorskip `predicate bytevector1 bytevector2'' ...`)` > exact nonnegative integer or `#f` 34 34 35 (<type>vectorskipright pred? bytevector1 bytevector2 ...)> exact nonnegative integer or #f35 `(<type>vectorskipright `''predicate bytevector1 bytevector2'' ...`)` > exact nonnegative integer or #f 36 36 37 (<type>vectorbinarysearch bytevector value cmp) > exact nonnegative integer or #f 37 `(<type>vectorbinarysearch `''bytevector value cmp''`)` > exact nonnegative integer or `#f` 38 38 39 (<type>vectorany pred? bytevector1 bytevector2 ···) > value or #f 39 `(<type>vectorany predicate `''bytevector1 bytevector2'' ...`)` > value or `#f` 40 40 41 (<type>vectorevery pred? bytevector1 bytevector2 ···) > value or #f 41 `(<type>vectorevery predicate `''bytevector1 bytevector2'' ...`)` > value or `#f` 42 42 43 43 44 44 == Swap == 45 45 46 (<type>vectorswap! bytevector i j)> unspecified46 `(<type>vectorswap! `''bytevector i j''`)` > unspecified 47 47 48 48 Exchanges the values of the locations in ''bytevector'', when viewed as a <type>vector, at indices ''i'' and ''j''. … … 51 51 == Reverse operations == 52 52 53 (<type>vectorreverse! bytevector [start [end]]) > unspecified 53 `(<type>vectorreverse! `''bytevector'' [ ''start'' [ ''end'' ] ] `)` 54 54 55 The `<type>vectorreversecopy`, `<type>reversevector>vector`, `<type>reversevector>list`, `<type>reverselist>vector`, and `<type>reverselist>list` procedures are identical to their regular counterparts, but process the bytevector argument, when viewed as a <type>vector, in reverse order. 55 Destructively reverses the order of the elements in ''bytevector'' from ''start'' to ''end''. 56 57 The `<type>vectorreversecopy`, `<type>reversevector>vector`, `<type>reversevector>list`, `<type>reverselist>vector`, and `<type>reverselist>list` procedures are identical to their regular counterparts, but produce the bytevector argument, when viewed as a <type>vector, in reverse element order.