Skip to content

Latest commit

 

History

History
411 lines (215 loc) · 13.8 KB

scml_base_vector.md

File metadata and controls

411 lines (215 loc) · 13.8 KB

Module scml_base_vector

Scheme base library for vectors

. __Authors:__ CSCM Contributor ([`[email protected]`](mailto:[email protected])).

Function Index

'$scml_exports'/0
'list->vector'/1

Returns a vector constructed from the elements in the list.

.
'make-vector'/1Equivalent to 'make-vector'(K, '#f').
'make-vector'/2

Returns a vector of k elements.

.
'string->vector'/1Equivalent to 'list->vector'('string->list'(S, 0, 'string-length'(S))).
'string->vector'/2Equivalent to 'list->vector'('string->list'(S, Start, 'string-length'(S))).
'string->vector'/3Equivalent to 'list->vector'('string->list'(S, Start, End)).
'vector->list'/1Equivalent to 'vector->list'(V, 0, 'vector-length'(V)).
'vector->list'/2Equivalent to 'vector->list'(V, Start, 'vector-length'(V)).
'vector->list'/3

Returns a list of the elements of vector between start and end.

.
'vector->string'/1Equivalent to 'vector->string'(V, 0, 'vector-length'(V)).
'vector->string'/2Equivalent to 'vector->string'(V, Start, 'vector-length'(V)).
'vector->string'/3Equivalent to 'list->string'('vector->list'(V, Start, End)).
'vector-append'/1

Returns a vector whose elements are the concatenation of the elements in the given vectors.

.
'vector-copy!'/3

unsupported

.
'vector-copy!'/4

unsupported

.
'vector-copy!'/5

unsupported

.
'vector-copy'/1Equivalent to 'vector-copy'(V, 0, 'vector-length'(V)).
'vector-copy'/2Equivalent to 'vector-copy'(V, Start, 'vector-length'(V)).
'vector-copy'/3

Returns a vector constructed from the elements of vector beginning with index start and ending with index end.

.
'vector-fill!'/2

unsupported

.
'vector-fill!'/3

unsupported

.
'vector-fill!'/4

unsupported

.
'vector-length'/1

Returns the number of elements in the given vector.

.
'vector-ref'/2

Returns element k of vector using zero-origin indexing. It is an error if k is not a valid index of vector.

.
'vector-set!'/3

unsupported

.
'vector?'/1

Returns #t if obj is a vector, otherwise returns #f.

.
vector/1

Returns a vector whose elements contain the given arguments.

.

Function Details

'$scml_exports'/0


'$scml_exports'() -> [{scm_symbol(), scmi_nip()}]



'list->vector'/1


'list->vector'(Objs::[scm_obj()]) -> scm_vector()



Returns a vector constructed from the elements in the list.

'make-vector'/1


'make-vector'(K::scm_k()) -> scm_vector()



Equivalent to 'make-vector'(K, '#f').

'make-vector'/2


'make-vector'(K::scm_k(), Obj::scm_obj()) -> scm_vector()



Returns a vector of k elements.

'string->vector'/1


'string->vector'(S::scm_string()) -> scm_vector()



Equivalent to 'list->vector'('string->list'(S, 0, 'string-length'(S))).

'string->vector'/2


'string->vector'(S::scm_string(), Start::scm_start()) -> scm_vector()



Equivalent to 'list->vector'('string->list'(S, Start,'string-length'(S))).

'string->vector'/3


'string->vector'(S::scm_string(), Start::scm_start(), End::scm_end()) -> scm_vector()



Equivalent to 'list->vector'('string->list'(S, Start, End)).

'vector->list'/1


'vector->list'(Vector::scm_vector()) -> [scm_obj()]



Equivalent to 'vector->list'(V, 0, 'vector-length'(V)).

'vector->list'/2


'vector->list'(Vector::scm_vector(), Start::scm_start()) -> [scm_obj()]



Equivalent to 'vector->list'(V, Start, 'vector-length'(V)).

'vector->list'/3


'vector->list'(Vector::scm_vector(), Start::scm_start(), End::scm_end()) -> [scm_obj()]



Returns a list of the elements of vector between start and end.

'vector->string'/1


'vector->string'(V::scm_vector()) -> scm_string()



Equivalent to 'vector->string'(V, 0, 'vector-length'(V)).

'vector->string'/2


'vector->string'(V::scm_vector(), Start::scm_start()) -> scm_string()



Equivalent to 'vector->string'(V, Start, 'vector-length'(V)).

'vector->string'/3


'vector->string'(V::scm_vector(), Start::scm_start(), End::scm_end()) -> scm_string()



Equivalent to 'list->string'('vector->list'(V, Start, End)).

'vector-append'/1


'vector-append'(Vs::[scm_vector(), ...]) -> scm_vector()



Returns a vector whose elements are the concatenation of the elements in the given vectors.

'vector-copy!'/3


'vector-copy!'(To::scm_vector(), At::scm_k(), From::scm_vector()) -> scm_false()



unsupported

'vector-copy!'/4


'vector-copy!'(To::scm_vector(), At::scm_k(), From::scm_vector(), Start::scm_start()) -> scm_false()



unsupported

'vector-copy!'/5


'vector-copy!'(To::scm_vector(), At::scm_k(), From::scm_vector(), Start::scm_start(), End::scm_end()) -> scm_false()



unsupported

'vector-copy'/1


'vector-copy'(V::scm_vector()) -> scm_vector()



Equivalent to 'vector-copy'(V, 0, 'vector-length'(V)).

'vector-copy'/2


'vector-copy'(Vector::scm_vector(), Start::scm_start()) -> scm_vector()



Equivalent to 'vector-copy'(V, Start, 'vector-length'(V)).

'vector-copy'/3


'vector-copy'(V::scm_vector(), Start::scm_start(), End::scm_end()) -> scm_vector()



Returns a vector constructed from the elements of vector beginning with index start and ending with index end.

'vector-fill!'/2


'vector-fill!'(V::scm_vector(), Fill::scm_obj()) -> scm_false()



unsupported

'vector-fill!'/3


'vector-fill!'(V::scm_vector(), Fill::scm_obj(), Start::scm_start()) -> scm_false()



unsupported

'vector-fill!'/4


'vector-fill!'(V::scm_vector(), Fill::scm_obj(), Start::scm_start(), End::scm_end()) -> scm_false()



unsupported

'vector-length'/1


'vector-length'(Vector::scm_vector()) -> scm_k()



Returns the number of elements in the given vector.

'vector-ref'/2


'vector-ref'(Vector::scm_vector(), K::scm_k()) -> scm_obj()



Returns element k of vector using zero-origin indexing. It is an error if k is not a valid index of vector.

'vector-set!'/3


'vector-set!'(V::scm_vector(), K::scm_k(), Obj::scm_obj()) -> scm_false()



unsupported

'vector?'/1


'vector?'(Vector::scm_obj()) -> scm_boolean()



Returns #t if obj is a vector, otherwise returns #f.

vector/1


vector(Objs::[scm_obj(), ...]) -> scm_vector()



Returns a vector whose elements contain the given arguments.