Common Lisp Package: CL-SLICE-DEV

README:

FUNCTION

Public

ALL-SINGLETON-REPRESENTATIONS? (REPRESENTATIONS)

Test if all canonical representations are singletons.

CANONICAL-RANGE (START END)

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

CANONICAL-REPRESENTATIONS (AXES SLICES)

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

CANONICAL-SEQUENCE (SEQUENCE)

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

CANONICAL-SINGLETON (INDEX)

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

REPRESENTATION-DIMENSIONS (REPRESENTATIONS)

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

ROW-MAJOR-SETUP (REPRESENTATIONS TERMINATOR)

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

SINGLETON-REPRESENTATION? (REPRESENTATION)

Test if a canonical REPRESENTATION is a singleton.

SLICE-RESERVED-SYMBOL? (SYMBOL)

Test if SYMBOL has special semantics for SLICE.

Private

CANONICAL-RANGE-END (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CANONICAL-RANGE-START (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CANONICAL-SEQUENCE-VECTOR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

REPRESENTATION-DIMENSION (REPRESENTATION)

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

REPRESENTATION-INITIAL-VALUE (REPRESENTATION)

Initial value for iteration.

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.

Undocumented

SETFCANONICAL-RANGE-END (NEW-VALUE INSTANCE)

CANONICAL-RANGE-P (OBJECT)

SETFCANONICAL-RANGE-START (NEW-VALUE INSTANCE)

CANONICAL-SEQUENCE-P (OBJECT)

SETFCANONICAL-SEQUENCE-VECTOR (NEW-VALUE INSTANCE)

COPY-CANONICAL-RANGE (INSTANCE)

COPY-CANONICAL-SEQUENCE (INSTANCE)

MAKE-CANONICAL-RANGE (&KEY ((START DUM5) NIL) ((END DUM6) NIL))

MAKE-CANONICAL-SEQUENCE (&KEY ((VECTOR DUM56) NIL))

MACRO

Public

TRAVERSE-REPRESENTATIONS ((SUBSCRIPTS REPRESENTATIONS &KEY INDEX (SETUP 'ROW-MAJOR-SETUP)) &BODY BODY)

A macro for traversing representations. Loops over all possible subscripts in REPRESENTAITONS, making them available in SUBSCRIPS 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.

GENERIC-FUNCTION

Public

AXIS-DIMENSION (AXIS)

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

CANONICAL-REPRESENTATION (AXIS SLICE)

Canonical representation of SLICE, given information in AXIS. The default methods just use dimensions as AXIS. Each slice 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. 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. It recommended that methods that resolve symbols test them with SLICE-RESERVED-SYMBOL? and use CALL-NEXT-METHOD.

CLASS

Public

CANONICAL-RANGE (START END)

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

CANONICAL-SEQUENCE (SEQUENCE)

Canonical representation of a sequence of array indexes.