[[tags: egg]] == chunk-vector [[toc:]] === Description A dyn-vector like library capable of storing other srfi-4 vectors inside a dense array. === Author Richard van Roy (pluizer) === Requirements none === Documentation ==== Procedures (make-f32chunk-vector size [size-hint])
(make-f64chunk-vector size [size-hint])
(make-s8chunk-vector size [size-hint])
(make-s16chunk-vector size [size-hint])
(make-s32chunk-vector size [size-hint])
(make-u8chunk-vector size [size-hint])
(make-u16chunk-vector size [size-hint])
(make-u32chunk-vector size [size-hint])
Create a new chunk vector with a chunk-size of /size/. (f32vector-remove! vector index)
(f64vector-remove! vector index)
(s8vector-remove! vector index)
(s16vector-remove! vector index)
(s32vector-remove! vector index)
(u8vector-remove! vector index)
(u16vector-remove! vector index)
(u32vector-remove! vector index)
Removes a chunk from the vector using its /index/. (f32vector-set! vectror index value)
(f64vector-set! vectror index value)
(s8vector-set! vectror index value)
(s16vector-set! vectror index value)
(s32vector-set! vectror index value)
(u8vector-set! vectror index value)
(u16vector-set! vectror index value)
(u32vector-set! vectror index value)
Changed the value of a chunk using its /index/. (f32vector-push! vector value)
(f64vector-push! vector value)
(s8vector-push! vector value)
(s16vector-push! vector value)
(s32vector-push! vector value)
(u8vector-push! vector value)
(u16vector-push! vector value)
(u32vector-push! vector value)
Pushes a new chunk to the vector. (f32vector-ref vector index)
(f64vector-ref vector index)
(s8vector-ref vector index)
(s16vector-ref vector index)
(s32vector-ref vector index)
(u8vector-ref vector index)
(u16vector-ref vector index)
(u32vector-ref vector index)
Returns the data at /index/. (f32vector-length vector)
(f64vector-length vector)
(s8vector-length vector)
(s16vector-length vector)
(s32vector-length vector)
(u8vector-length vector)
(u16vector-length vector)
(u32vector-length vector)
Returns the number of chunks in the vector. (f32vector->pointer vector)
(f64vector->pointer vector)
(s8vector->pointer vector)
(s16vector->pointer vector)
(s32vector->pointer vector)
(u8vector->pointer vector)
(u16vector->pointer vector)
(u32vector->pointer vector)
Returns a pointer to the dense foreign array where the data is stored. ==== Example (use chunk-vector) ;; Create a chunk-vector that holds f32vectors with the size of 2. (define v (make-f32chunk-vector 2)) (define index-a (f32chunk-vector-push! v (f32vector 1 2))) (define index-b (f32chunk-vector-push! v (f32vector 3 4))) (define index-c (f32chunk-vector-push! v (f32vector 7 8))) (f32chunk-vector-remove! v index-c) (f32chunk-vector-set! v index-b (f32vector 0 0)) (print (f32chunk-vector-ref v index-a)) ; => #f32(1.0 2.0) (print (f32chunk-vector-ref v index-b)) ; => #f32(0.0 0.0) (print (f32chunk-vector-ref v index-c)) ; undefined