2021-02-05

(sph uniform-vector)

helpers for srfi-4 and compatible vectors. for example f32vector

part of sph-lib

module name

(sph uniform-vector)

exported bindings

procedure: bytevector-append a ... ->
bytevector ... -> bytevector
procedure: bytevector-contains? a search-bv ->
bytevector bytevector -> boolean
true if bytevector \"a\" contains bytevector \"search-bv\"
procedure: f32vector-copy a ->
xvector -> xvector
procedure: f32vector-copy* a c ->
procedure: f32vector-copy-zero a ->
procedure: f32vector-copy-zero* a c ->
procedure: f32vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: f32vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: f32vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: f32vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: f32vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: f32vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: f32vector-map-with-index f a b ... ->
procedure:{index any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f index a-element b-element ...)
procedure: f32vector-map-with-index! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: f32vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: f32vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: f32vector-range-map-with f variable start end a b ... ->
procedure: f32vector-range-map-with! result f variable start end a b ... ->
procedure: f32vector-range-map-with-index! result f start end a b ... ->
procedure:{integer:index any:element ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f index a-element b-element ...).
all vectors must be of sufficient size
procedure: f32vector-range-set a f start end ->
procedure: f32vector-range-set! a f start end ->
procedure: f64vector-copy a ->
xvector -> xvector
procedure: f64vector-copy* a c ->
procedure: f64vector-copy-zero a ->
procedure: f64vector-copy-zero* a c ->
procedure: f64vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: f64vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: f64vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: f64vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: f64vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: f64vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: f64vector-map-with-index f a b ... ->
procedure:{index any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f index a-element b-element ...)
procedure: f64vector-map-with-index! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: f64vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: f64vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: f64vector-range-map-with f variable start end a b ... ->
procedure: f64vector-range-map-with! result f variable start end a b ... ->
procedure: f64vector-range-map-with-index! result f start end a b ... ->
procedure:{integer:index any:element ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f index a-element b-element ...).
all vectors must be of sufficient size
procedure: f64vector-range-set a f start end ->
procedure: f64vector-range-set! a f start end ->
procedure: integer->bytevector a ->
integer:signed-integer -> bytevector
create a bytevector of minimum size storing the given signed integer
procedure: s16vector-copy a ->
xvector -> xvector
procedure: s16vector-copy* a c ->
procedure: s16vector-copy-zero a ->
procedure: s16vector-copy-zero* a c ->
procedure: s16vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: s16vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: s16vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: s16vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: s16vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: s16vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: s16vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: s16vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: s16vector-range-map-with f variable start end a b ... ->
procedure: s16vector-range-map-with! result f variable start end a b ... ->
procedure: s16vector-range-set a f start end ->
procedure: s16vector-range-set! a f start end ->
procedure: s32vector-copy a ->
xvector -> xvector
procedure: s32vector-copy* a c ->
procedure: s32vector-copy-zero a ->
procedure: s32vector-copy-zero* a c ->
procedure: s32vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: s32vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: s32vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: s32vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: s32vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: s32vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: s32vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: s32vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: s32vector-range-map-with f variable start end a b ... ->
procedure: s32vector-range-map-with! result f variable start end a b ... ->
procedure: s32vector-range-set a f start end ->
procedure: s32vector-range-set! a f start end ->
procedure: s8vector-copy a ->
xvector -> xvector
procedure: s8vector-copy* a c ->
procedure: s8vector-copy-zero a ->
procedure: s8vector-copy-zero* a c ->
procedure: s8vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: s8vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: s8vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: s8vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: s8vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: s8vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: s8vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: s8vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: s8vector-range-map-with f variable start end a b ... ->
procedure: s8vector-range-map-with! result f variable start end a b ... ->
procedure: s8vector-range-set a f start end ->
procedure: s8vector-range-set! a f start end ->
variable: sph-uniform-vector-description
procedure: u32vector-copy a ->
xvector -> xvector
procedure: u32vector-copy* a c ->
procedure: u32vector-copy-zero a ->
procedure: u32vector-copy-zero* a c ->
procedure: u32vector-create length f ->
integer {index -> float} -> xvector
make and initialise an xvector with the results of calling f as (f index)
procedure: u32vector-each-index f a ->
procedure:{integer integer:a-length -> unspecified} xvector -> unspecified
call f for each element in \"a\" with the index of the current element in \"a\"
procedure: u32vector-map f a b ... ->
procedure:{any:element ... -> any} xvector ... -> xvector
call f for each element of each vector. (f a-element b-element ...)
can be used to create processors like xvector-sum: (xvector-map + a b c)
procedure: u32vector-map! f a b ... ->
procedure:{any:element ... -> any} xvector ... -> unspecified
like uv-map but modifies \"a\"
procedure: u32vector-map-with f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> xvector
like xvector-map but passes the given variable as an additional first argument to each call of f.
example call: (xvector-map-with * 2 a)
procedure: u32vector-map-with! f variable a ... ->
procedure:{any:variable any:element ... -> any} any:variable xvector -> unspecified
like xvector-map but passes the given variable as an additional first argument on each call to f.
example call: (vector-map-with! * 2 a)
procedure: u32vector-range-map f start end a b ... ->
procedure:{any ... -> any} integer integer xvector ... -> xvector
like xvector-range-map but does not modify input
procedure: u32vector-range-map! result f start end a b ... ->
procedure:{any ... -> any} integer integer xvector xvector:source ... -> unspecified
set result to the map results of calling f for each element between start and end of one or multiple xvectors.
f is called (f a-element b-element ...).
all vectors must be of sufficient size
procedure: u32vector-range-map-with f variable start end a b ... ->
procedure: u32vector-range-map-with! result f variable start end a b ... ->
procedure: u32vector-range-set a f start end ->
procedure: u32vector-range-set! a f start end ->