The array-utils Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The array-utils Reference Manual

This is the array-utils Reference Manual, version 1.1.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 10:46:14 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

About Array-Utils

A miniature toolkit that contains some useful shifting/popping/pushing functions for arrays and vectors. This exists mostly because I've used these functions in multiple places already, so splitting it off into its own thing is a good idea. Originally from Plump.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 array-utils

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/array-utils

License

Artistic

Description

A few utilities for working with arrays.

Version

1.1.1

Source

array-utils.asd (file)

Component

utils.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 array-utils.asd

Location

array-utils.asd

Systems

array-utils (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 array-utils/utils.lisp

Parent

array-utils (system)

Location

utils.lisp

Packages

array-utils

Exported Definitions
Internal Definitions

positive-fixnum (type)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 array-utils

Source

utils.lisp (file)

Nickname

org.shirakumo.array-utils

Use List

common-lisp

Exported Definitions
Internal Definitions

positive-fixnum (type)


Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: array-shift ARRAY &key N FROM TO ADJUST FILL CONTENTS

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.

Package

array-utils

Source

utils.lisp (file)

Function: ensure-array-size ARRAY NEW-SPACE
Package

array-utils

Source

utils.lisp (file)

Function: vector-append VECTOR SEQUENCE &optional POSITION

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.

Package

array-utils

Source

utils.lisp (file)

Function: vector-pop-front VECTOR

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-POSITION

Package

array-utils

Source

utils.lisp (file)

Function: vector-pop-position VECTOR 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.

Package

array-utils

Source

utils.lisp (file)

Function: vector-push-extend-front ELEMENT VECTOR

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

Package

array-utils

Source

utils.lisp (file)

Function: vector-push-extend-position ELEMENT VECTOR 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.

Package

array-utils

Source

utils.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Types

Type: positive-fixnum ()
Package

array-utils

Source

utils.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   A   F   L  
Index Entry  Section

A
array-utils.asd: The array-utils<dot>asd file
array-utils/utils.lisp: The array-utils/utils<dot>lisp file

F
File, Lisp, array-utils.asd: The array-utils<dot>asd file
File, Lisp, array-utils/utils.lisp: The array-utils/utils<dot>lisp file

L
Lisp File, array-utils.asd: The array-utils<dot>asd file
Lisp File, array-utils/utils.lisp: The array-utils/utils<dot>lisp file

Jump to:   A   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   E   F   V  
Index Entry  Section

A
array-shift: Exported functions

E
ensure-array-size: Exported functions

F
Function, array-shift: Exported functions
Function, ensure-array-size: Exported functions
Function, vector-append: Exported functions
Function, vector-pop-front: Exported functions
Function, vector-pop-position: Exported functions
Function, vector-push-extend-front: Exported functions
Function, vector-push-extend-position: Exported functions

V
vector-append: Exported functions
vector-pop-front: Exported functions
vector-pop-position: Exported functions
vector-push-extend-front: Exported functions
vector-push-extend-position: Exported functions

Jump to:   A   E   F   V  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   P   S   T  
Index Entry  Section

A
array-utils: The array-utils system
array-utils: The array-utils package

P
Package, array-utils: The array-utils package
positive-fixnum: Internal types

S
System, array-utils: The array-utils system

T
Type, positive-fixnum: Internal types

Jump to:   A   P   S   T