This is the array-utils Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Aug 15 03:17:44 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
array-utils
A few utilities for working with arrays.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/array-utils.git)
zlib
1.2.0
utils.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
array-utils/utils.lisp
array-utils
(system).
array-shift
(function).
ensure-array-size
(function).
nslice
(function).
slice
(function).
slice*
(function).
vector-append
(function).
vector-pop-front
(function).
vector-pop-front*
(function).
vector-pop-position
(function).
vector-pop-position*
(function).
vector-push-extend-front
(function).
vector-push-extend-position
(function).
do-vector-types
(macro).
positive-fixnum
(type).
Packages are listed by definition order.
array-utils
org.shirakumo.array-utils
common-lisp
.
array-shift
(function).
ensure-array-size
(function).
nslice
(function).
slice
(function).
slice*
(function).
vector-append
(function).
vector-pop-front
(function).
vector-pop-front*
(function).
vector-pop-position
(function).
vector-pop-position*
(function).
vector-push-extend-front
(function).
vector-push-extend-position
(function).
do-vector-types
(macro).
positive-fixnum
(type).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Shifts a subset of array elements in either direction for a specified amount.
Optionally also extends the array and fills empty space with a given element.
N — The amount to be moved. If positive, things are shifted to the right. If
negative, things are shifted to the left.
FROM — The left point of the region to move, inclusive.
TO — The right point of the region to move, exclusive.
ADJUST — Whether to adjust the fill pointer and the array bounds. The array is only
adjusted if N is positive and the range of TO+N would exceed the ARRAY length,
or if N is negative and TO equals the length of the ARRAY
FILL — If provided, empty spaces created by the move will be filled with this element.
CONTENTS — If provided, uses the contents to fill the new space. If |N| is greater than the
length of this sequence, FILL is used to fill the rest of the space if it is
provided. If not, an error is signalled. No matter whether N is negative or
positive, the content is filled in from left to right in the order it is given.
Modifies the vector to a sub-vector of itself.
START — If positive:
the inclusive starting index of the slice
If negative:
the inclusive starting index of the slice from
the end of the vector
If NULL: same as zero
END — If positive:
the exclusive ending index of the slice
If negative:
the exclusive ending index of the slice from
the end of the vector.
If NULL: same as the length of the vector
STEP — If above zero:
the step size between elements of the slice
If NULL: same as one
Note that this always modifies the passed vector, and
adjusts the fill pointer, if one is present.
See NSLICE
See SLICE*
Creates a sub-vector of the given vector.
START — If positive:
the inclusive starting index of the slice
If negative:
the inclusive starting index of the slice from
the end of the vector
If NULL: same as zero
END — If positive:
the exclusive ending index of the slice
If negative:
the exclusive ending index of the slice from
the end of the vector.
If NULL: same as the length of the vector
STEP — If above zero:
the step size between elements of the slice
If NULL: same as one
Note that this always creates a fresh copy of the vector,
preserving the element type and other properties.
See NSLICE
See SLICE*
Creates a sub-vector of the given vector.
START — If positive:
the inclusive starting index of the slice
If negative:
the inclusive starting index of the slice from
the end of the vector
If NULL: same as zero
END — If positive:
the exclusive ending index of the slice
If negative:
the exclusive ending index of the slice from
the end of the vector.
If NULL: same as the length of the vector
Note that this creates a displaced vector pointing to the original vector. It thus shares the data with the original vector, and does not support a STEP size other than 1.
See SLICE
See NSLICE
Appends all elements of the sequence at position of the vector and returns it. This is potentially very costly as all elements after the given position need to be shifted back as per ARRAY-SHIFT.
Pops the first element off the vector and returns it.
This operation is very costly and takes O(n) time as each element needs to
be shifted as per ARRAY-SHIFT.
See VECTOR-POP-FRONT*
See VECTOR-POP-POSITION
Pops the first element off the vector and returns it.
This is faster than VECTOR-POP-FRONT, but does not preserve the order of elements
in the vector.
See VECTOR-POP-FRONT
See VECTOR-POP-POSITION
Pops the element at the given position of the vector and returns it.
This is potentially very costly as all elements after the given position
need to be shifted back as per ARRAY-SHIFT.
If the array has an element-type of T, the element moved beyond the fill
pointer is set to NIL to avoid a memory leak.
See VECTOR-POP-POSITION*
Pops the element at the given position of the vector and returns it.
This is faster than VECTOR-POP-POSITION, but does not preserve the order of elements
in the vector.
If the array has an element-type of T, the element moved beyond the fill
pointer is set to NIL to avoid a memory leak.
See VECTOR-POP-POSITION
Pushes the element onto the front of the vector and extends if necessary.
This operation is very costly and takes O(n) time as each element needs to
be shifted as per ARRAY-SHIFT.
See VECTOR-PUSH-EXTEND-POSITION
Pushes the element into the specified position and shifts everything to the right to make space. This is potentially very costly as all elements after the given position need to be shifted as per ARRAY-SHIFT.
Jump to: | A D E F M N S V |
---|
Jump to: | A D E F M N S V |
---|
Jump to: | A F P S T U |
---|
Jump to: | A F P S T U |
---|