The select Reference Manual

Table of Contents

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

The select Reference Manual

This is the select Reference Manual, version 1.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 11:18:15 2019 GMT+0.


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

1 Introduction

Documentation for select can be found at:

https://symbolics.github.io/select/


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 select

Author

Steven Nunez <steve.nunez@inference.sg>

Home Page

http://inference.sg/projects/select/

Source Control

(:git "git://github.com/symbolics/select")

License

Boost

Description

DSL for array slices.

Long Description

Select is a facility for selecting portions of sequences or arrays. It
provides:

An user interface for taking slices (elements selected by the Cartesian product of vectors of subscripts for each axis) of array-like objects. The most important function is ’select’. Unless you want to define a method for this (besides what is alreadyimplemented), this is all you need from this library.

An extensible DSL for selecting a subset of valid subscripts. This is useful if, for example, you want to resolve column names in a data frame in your implementation of slice.

A set of utility functions for traversing slices in array-like objects.

Version

1.0.1

Dependencies
Source

select.asd (file)

Components

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 select.asd

Location

select.asd

Systems

select (system)


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

3.1.2 select/package.lisp

Parent

select (system)

Location

package.lisp

Packages

slct


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

3.1.3 select/select-dev.lisp

Dependency

package.lisp (file)

Parent

select (system)

Location

select-dev.lisp

Exported Definitions
Internal Definitions

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

3.1.4 select/select.lisp

Dependency

select-dev.lisp (file)

Parent

select (system)

Location

select.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 slct

SELECT is a facility for selecting portions of sequences or arrays.

Source

package.lisp (file)

Nickname

select

Use List
Exported Definitions
Internal Definitions

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


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

5.1.1 Functions

Function: head COUNT

First COUNT indexes.

Package

slct

Source

select.lisp (file)

Function: including START END

Range, including both ends.

Package

slct

Source

select.lisp (file)

Function: nodrop INDEX

Select a single index, but do not drop a dimension.

Package

slct

Source

select.lisp (file)

Function: range START END

Range, including START, excluding END.

Package

slct

Source

select.lisp (file)

Function: select-reserved-symbol? SYMBOL

Test if SYMBOL has special semantics for SELECTION.

Package

slct

Source

select-dev.lisp (file)

Function: singleton-representation? REPRESENTATION

Test if a canonical REPRESENTATION is a singleton.

Package

slct

Source

select-dev.lisp (file)

Function: tail COUNT

Last COUNT indexes.

Package

slct

Source

select.lisp (file)


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

5.1.2 Generic functions

Generic Function: mask PREDICATE SEQUENCE

Map sequence into a simple-bit-vector, using 1 when PREDICATE yields true, 0 otherwise.

Package

slct

Source

select.lisp (file)

Methods
Method: mask PREDICATE (SEQUENCE sequence)
Generic Function: ref OBJECT &rest SUBSCRIPTS

Return the element of OBJECT specified by SUBSCRIPTS.

Package

slct

Source

select.lisp (file)

Writer

(setf ref) (generic function)

Methods
Method: ref (ARRAY array) &rest SUBSCRIPTS
Generic Function: (setf ref) VALUE OBJECT &rest SUBSCRIPTS

Stores VALUE into the place specified by SUBSCRIPTS.

Package

slct

Source

select.lisp (file)

Reader

ref (generic function)

Methods
Method: (setf ref) VALUE (ARRAY array) &rest SUBSCRIPTS
Generic Function: select OBJECT &rest SELECTIONS

Return the slices of OBJECT specified by SELECTIONS.

Package

slct

Source

select.lisp (file)

Writer

(setf select) (generic function)

Methods
Method: select (LST list) &rest SELECTIONS

Select from LST the subscripts or range specified in SELECTIONS. SELECTIONS must be a VECTOR, LIST or RANGE.

Method: select (ARRAY array) &rest SELECTIONS

Return the SELECTIONS in the given ARRAY.

Generic Function: (setf select) VALUE OBJECT &rest SELECTIONS

Stores VALUES into the locations given by SELECTIONS.

Package

slct

Source

select.lisp (file)

Reader

select (generic function)

Methods
Method: (setf select) VALUE (ARRAY array) &rest SELECTIONS
Generic Function: which PREDICATE SEQUENCE

Return an index of the positions in SEQUENCE which satisfy PREDICATE.

Package

slct

Source

select.lisp (file)

Methods
Method: which PREDICATE (SEQUENCE sequence)

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

5.1.3 Structures

Structure: including ()

Range, including both ends.

Package

slct

Source

select.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

canonical-representation (method)

Direct slots
Slot: start
Readers

including-start (function)

Writers

(setf including-start) (function)

Slot: end
Readers

including-end (function)

Writers

(setf including-end) (function)

Structure: nodrop ()

Select a single index, but don’t drop a dimension.

Package

slct

Source

select.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

canonical-representation (method)

Direct slots
Slot: index
Readers

nodrop-index (function)

Writers

(setf nodrop-index) (function)

Structure: range ()

Range, including start, excluding end.

Package

slct

Source

select.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

canonical-representation (method)

Direct slots
Slot: start
Readers

range-start (function)

Writers

(setf range-start) (function)

Slot: end
Readers

range-end (function)

Writers

(setf range-end) (function)


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

5.2 Internal definitions


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

5.2.1 Macros

Macro: traverse-representations (SUBSCRIPTS REPRESENTATIONS &key INDEX SETUP) &body BODY

Loops over all possible subscripts in REPRESENTAITONS, making them available in SUBSCRIPTS during the execution of BODY. The iterator is constructed using the function SETUP (see for example ROW-MAJOR-SETUP). When INDEX is given, a variable with that name is provided, containing an index that counts iterations.

Package

slct

Source

select-dev.lisp (file)


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

5.2.2 Functions

Function: all-singleton-representations? REPRESENTATIONS

Test if all canonical representations are singletons.

Package

slct

Source

select-dev.lisp (file)

Function: canonical-range START END

Canonical representation of a contiguous set of array indices from START (inclusive) to END (exclusive).

Package

slct

Source

select-dev.lisp (file)

Function: canonical-range-end INSTANCE
Function: (setf canonical-range-end) VALUE INSTANCE
Package

slct

Source

select-dev.lisp (file)

Function: canonical-range-p OBJECT
Package

slct

Source

select-dev.lisp (file)

Function: canonical-range-start INSTANCE
Function: (setf canonical-range-start) VALUE INSTANCE
Package

slct

Source

select-dev.lisp (file)

Function: canonical-representations AXES SELECTIONS

Return the canonical representations of SELECTIONS given the corresponding AXES, checking for matching length.

Package

slct

Source

select-dev.lisp (file)

Function: canonical-sequence SEQUENCE

Canonical representation of array indexes from canonical-sequence SEQUENCE.

May share structure. Vectors of the upgraded type of (SIMPLE-ARRAY ARRAY-INDEX (*)) are preferred for efficiency, otherwise they are coerced.

Package

slct

Source

select-dev.lisp (file)

Function: canonical-sequence-p OBJECT
Package

slct

Source

select-dev.lisp (file)

Function: canonical-sequence-vector INSTANCE
Function: (setf canonical-sequence-vector) VALUE INSTANCE
Package

slct

Source

select-dev.lisp (file)

Function: canonical-singleton INDEX

Canonical representation of a singleton index (a nonnegative integer, which is a valid array index).

Package

slct

Source

select-dev.lisp (file)

Function: column-major-setup REPRESENTATIONS TERMINATOR

Return SUBSCRIPTS (a list) and ITERATOR (a closure, no arguments) that increments the contents of SUBSCRIPTS in column-major order. TERMINATOR is called when all subscripts have been visited.

Package

slct

Source

select-dev.lisp (file)

Function: copy-canonical-range INSTANCE
Package

slct

Source

select-dev.lisp (file)

Function: copy-canonical-sequence INSTANCE
Package

slct

Source

select-dev.lisp (file)

Function: copy-including INSTANCE
Package

slct

Source

select.lisp (file)

Function: copy-nodrop INSTANCE
Package

slct

Source

select.lisp (file)

Function: copy-range INSTANCE
Package

slct

Source

select.lisp (file)

Function: including-end INSTANCE
Function: (setf including-end) VALUE INSTANCE
Package

slct

Source

select.lisp (file)

Function: including-p OBJECT
Package

slct

Source

select.lisp (file)

Function: including-start INSTANCE
Function: (setf including-start) VALUE INSTANCE
Package

slct

Source

select.lisp (file)

Function: make-canonical-range &key (START START) (END END)
Package

slct

Source

select-dev.lisp (file)

Function: make-canonical-sequence &key (VECTOR VECTOR)
Package

slct

Source

select-dev.lisp (file)

Function: make-including &key (START START) (END END)
Package

slct

Source

select.lisp (file)

Function: make-nodrop &key (INDEX INDEX)
Package

slct

Source

select.lisp (file)

Function: make-range &key (START START) (END END)
Package

slct

Source

select.lisp (file)

Function: nodrop-index INSTANCE
Function: (setf nodrop-index) VALUE INSTANCE
Package

slct

Source

select.lisp (file)

Function: nodrop-p OBJECT
Package

slct

Source

select.lisp (file)

Function: range-end INSTANCE
Function: (setf range-end) VALUE INSTANCE
Package

slct

Source

select.lisp (file)

Function: range-p OBJECT
Package

slct

Source

select.lisp (file)

Function: range-start INSTANCE
Function: (setf range-start) VALUE INSTANCE
Package

slct

Source

select.lisp (file)

Function: representation-dimension REPRESENTATION

Return the dimension of a canonical-representation, or NIL for singleton selections (they are dropped).

Package

slct

Source

select-dev.lisp (file)

Function: representation-dimensions REPRESENTATIONS

Return a list for the dimensions of canonical representations, dropping singletons.

Package

slct

Source

select-dev.lisp (file)

Function: representation-initial-value REPRESENTATION

Initial value for iteration.

Package

slct

Source

select-dev.lisp (file)

Function: representation-iterator REPRESENTATION CARRY CONS

Return a closure that sets the car of CONS to the next value each time it is called, resetting and calling CARRY when it reaches the end of its range.

Package

slct

Source

select-dev.lisp (file)

Function: row-major-setup REPRESENTATIONS TERMINATOR

Return SUBSCRIPTS (a list) and ITERATOR (a closure, no arguments) that increments the contents of SUBSCRIPTS in row-major order. TERMINATOR is called when all subscripts have been visited.

Package

slct

Source

select-dev.lisp (file)


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

5.2.3 Generic functions

Generic Function: axis-dimension AXIS

Return the dimension of axis. Needs to be defined for non-integer axes.

Package

slct

Source

select-dev.lisp (file)

Generic Function: canonical-representation AXIS SELECTION

Canonical representation of SELECTION, given information in AXIS. The default methods use dimensions as AXIS.

Each selection needs to be resolved into a canonical representation, which is either a singleton, a range, or a sequence of subscripts. They should only be constructed with the corresponding CANONICAL-SINGLETION, CANONICAL-RANGE and CANONICAL-SEQUENCE functions.

@c(CANONICAL-REPRESENTATION) needs to ensure that the represented subscripts are valid for the axis.

Unless a specialized method is found, the dimension of the axis is queried with AXIS-DIMENSION and resolution is attempted using the latter. Methods that resolve symbols should test them with SELECT-RESERVED-SYMBOL? and use CALL-NEXT-METHOD.

Package

slct

Source

select-dev.lisp (file)

Methods
Method: canonical-representation AXIS (SELECTION nodrop)

The canonical representation for NODROP.

Source

select.lisp (file)

Method: canonical-representation AXIS (SELECTION range)

The canonical representation for RANGE.

Source

select.lisp (file)

Method: canonical-representation AXIS (SELECTION including)

The canonical representation for INCLUDING.

Source

select.lisp (file)

Method: canonical-representation AXIS SELECTION
Method: canonical-representation AXIS (CANONICAL-RANGE canonical-range)
Method: canonical-representation AXIS (CANONICAL-SEQUENCE canonical-sequence)
Method: canonical-representation (AXIS integer) (SLICE null)
Method: canonical-representation (AXIS integer) (SELECTION integer)
Method: canonical-representation AXIS (SELECTION sequence)
Method: canonical-representation (AXIS integer) (SELECTION (eql t))
Method: canonical-representation AXIS (SELECTION bit-vector)

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

5.2.4 Structures

Structure: canonical-range ()

Canonical representation of a contiguous set of array indices from START (inclusive) to END (exclusive).

Package

slct

Source

select-dev.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

canonical-representation (method)

Direct slots
Slot: start
Type

alexandria.1.0.0:array-index

Readers

canonical-range-start (function)

Writers

(setf canonical-range-start) (function)

Slot: end
Type

alexandria.1.0.0:array-index

Readers

canonical-range-end (function)

Writers

(setf canonical-range-end) (function)

Structure: canonical-sequence ()

Canonical representation of a sequence of array indexes.

Package

slct

Source

select-dev.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

canonical-representation (method)

Direct slots
Slot: vector
Type

(simple-array alexandria.1.0.0:array-index (*))

Readers

canonical-sequence-vector (function)

Writers

(setf canonical-sequence-vector) (function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, select.asd: The select․asd file
File, Lisp, select/package.lisp: The select/package․lisp file
File, Lisp, select/select-dev.lisp: The select/select-dev․lisp file
File, Lisp, select/select.lisp: The select/select․lisp file

L
Lisp File, select.asd: The select․asd file
Lisp File, select/package.lisp: The select/package․lisp file
Lisp File, select/select-dev.lisp: The select/select-dev․lisp file
Lisp File, select/select.lisp: The select/select․lisp file

S
select.asd: The select․asd file
select/package.lisp: The select/package․lisp file
select/select-dev.lisp: The select/select-dev․lisp file
select/select.lisp: The select/select․lisp file

Jump to:   F   L   S  

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

A.2 Functions

Jump to:   (  
A   C   F   G   H   I   M   N   R   S   T   W  
Index Entry  Section

(
(setf canonical-range-end): Internal functions
(setf canonical-range-start): Internal functions
(setf canonical-sequence-vector): Internal functions
(setf including-end): Internal functions
(setf including-start): Internal functions
(setf nodrop-index): Internal functions
(setf range-end): Internal functions
(setf range-start): Internal functions
(setf ref): Exported generic functions
(setf ref): Exported generic functions
(setf select): Exported generic functions
(setf select): Exported generic functions

A
all-singleton-representations?: Internal functions
axis-dimension: Internal generic functions

C
canonical-range: Internal functions
canonical-range-end: Internal functions
canonical-range-p: Internal functions
canonical-range-start: Internal functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representation: Internal generic functions
canonical-representations: Internal functions
canonical-sequence: Internal functions
canonical-sequence-p: Internal functions
canonical-sequence-vector: Internal functions
canonical-singleton: Internal functions
column-major-setup: Internal functions
copy-canonical-range: Internal functions
copy-canonical-sequence: Internal functions
copy-including: Internal functions
copy-nodrop: Internal functions
copy-range: Internal functions

F
Function, (setf canonical-range-end): Internal functions
Function, (setf canonical-range-start): Internal functions
Function, (setf canonical-sequence-vector): Internal functions
Function, (setf including-end): Internal functions
Function, (setf including-start): Internal functions
Function, (setf nodrop-index): Internal functions
Function, (setf range-end): Internal functions
Function, (setf range-start): Internal functions
Function, all-singleton-representations?: Internal functions
Function, canonical-range: Internal functions
Function, canonical-range-end: Internal functions
Function, canonical-range-p: Internal functions
Function, canonical-range-start: Internal functions
Function, canonical-representations: Internal functions
Function, canonical-sequence: Internal functions
Function, canonical-sequence-p: Internal functions
Function, canonical-sequence-vector: Internal functions
Function, canonical-singleton: Internal functions
Function, column-major-setup: Internal functions
Function, copy-canonical-range: Internal functions
Function, copy-canonical-sequence: Internal functions
Function, copy-including: Internal functions
Function, copy-nodrop: Internal functions
Function, copy-range: Internal functions
Function, head: Exported functions
Function, including: Exported functions
Function, including-end: Internal functions
Function, including-p: Internal functions
Function, including-start: Internal functions
Function, make-canonical-range: Internal functions
Function, make-canonical-sequence: Internal functions
Function, make-including: Internal functions
Function, make-nodrop: Internal functions
Function, make-range: Internal functions
Function, nodrop: Exported functions
Function, nodrop-index: Internal functions
Function, nodrop-p: Internal functions
Function, range: Exported functions
Function, range-end: Internal functions
Function, range-p: Internal functions
Function, range-start: Internal functions
Function, representation-dimension: Internal functions
Function, representation-dimensions: Internal functions
Function, representation-initial-value: Internal functions
Function, representation-iterator: Internal functions
Function, row-major-setup: Internal functions
Function, select-reserved-symbol?: Exported functions
Function, singleton-representation?: Exported functions
Function, tail: Exported functions

G
Generic Function, (setf ref): Exported generic functions
Generic Function, (setf select): Exported generic functions
Generic Function, axis-dimension: Internal generic functions
Generic Function, canonical-representation: Internal generic functions
Generic Function, mask: Exported generic functions
Generic Function, ref: Exported generic functions
Generic Function, select: Exported generic functions
Generic Function, which: Exported generic functions

H
head: Exported functions

I
including: Exported functions
including-end: Internal functions
including-p: Internal functions
including-start: Internal functions

M
Macro, traverse-representations: Internal macros
make-canonical-range: Internal functions
make-canonical-sequence: Internal functions
make-including: Internal functions
make-nodrop: Internal functions
make-range: Internal functions
mask: Exported generic functions
mask: Exported generic functions
Method, (setf ref): Exported generic functions
Method, (setf select): Exported generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, canonical-representation: Internal generic functions
Method, mask: Exported generic functions
Method, ref: Exported generic functions
Method, select: Exported generic functions
Method, select: Exported generic functions
Method, which: Exported generic functions

N
nodrop: Exported functions
nodrop-index: Internal functions
nodrop-p: Internal functions

R
range: Exported functions
range-end: Internal functions
range-p: Internal functions
range-start: Internal functions
ref: Exported generic functions
ref: Exported generic functions
representation-dimension: Internal functions
representation-dimensions: Internal functions
representation-initial-value: Internal functions
representation-iterator: Internal functions
row-major-setup: Internal functions

S
select: Exported generic functions
select: Exported generic functions
select: Exported generic functions
select-reserved-symbol?: Exported functions
singleton-representation?: Exported functions

T
tail: Exported functions
traverse-representations: Internal macros

W
which: Exported generic functions
which: Exported generic functions

Jump to:   (  
A   C   F   G   H   I   M   N   R   S   T   W  

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

A.3 Variables

Jump to:   E   I   S   V  
Index Entry  Section

E
end: Exported structures
end: Exported structures
end: Internal structures

I
index: Exported structures

S
Slot, end: Exported structures
Slot, end: Exported structures
Slot, end: Internal structures
Slot, index: Exported structures
Slot, start: Exported structures
Slot, start: Exported structures
Slot, start: Internal structures
Slot, vector: Internal structures
start: Exported structures
start: Exported structures
start: Internal structures

V
vector: Internal structures

Jump to:   E   I   S   V  

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

A.4 Data types

Jump to:   C   I   N   P   R   S  
Index Entry  Section

C
canonical-range: Internal structures
canonical-sequence: Internal structures

I
including: Exported structures

N
nodrop: Exported structures

P
Package, slct: The slct package

R
range: Exported structures

S
select: The select system
slct: The slct package
Structure, canonical-range: Internal structures
Structure, canonical-sequence: Internal structures
Structure, including: Exported structures
Structure, nodrop: Exported structures
Structure, range: Exported structures
System, select: The select system

Jump to:   C   I   N   P   R   S