Figure 8.9:
k-sets and power sets of a set
| |
(vector-type size ) |
Creates an empty dynamic array with
size C++ elements of
type
type.
O(1)
Create a Scheme list containing the elements of
vec .
Note: for C++ types which have close Scheme analogs, such as
int, the
resulting list elements may be appropriately-typed Scheme objects.
O(
n)
Return #t if
vec is a vector of C++ objects of type
type.
O(1)
Return the element of
vec at location
.
O(1)
| |
(vector-fill! vec value ) |
Fill all of the entries of
vec with
value.
O(
n)
Create and return a new copy of
vec .
O(
n)
Assign
value to
vect[
index].
O(1)
Return the length of the longest initialized segment of
vec .
O(
n)
| |
(eq? vec1 vec2 veck ) |
Return true if all argments are the same vector.
O(
n)
| |
(eqv? vec1 vec2 veck ) |
Return true if all argments are vectors with the same elements.
O(
n)
| |
(< vec1 vec2 veck ) |
Return true if
veci <
vecj whenever

. Ordering
is lexicographic.
O(
n)
| |
(<= vec1 vec2 veck ) |
Return true if
veci <=
vecj whenever

. Ordering
is lexicographic.
O(
n)
| |
(> vec1 vec2 veck ) |
Return true if
veci >
vecj whenever

. Ordering
is lexicographic.
O(
n)
| |
(>= vec1 vec2 veck ) |
Return true if
veci >=
vecj whenever

. Ordering
is lexicographic.
O(
n)
| |
(vector-resize vec newsize ) |
Change the number of memory locations allocated to
vec .
O(
n +
newsize)