This is the xarray Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:07:00 2024 GMT+0.
xarray/xarray.asd
xarray/package-init/package.lisp
xarray/basics/types.lisp
xarray/basics/utilities.lisp
xarray/basics/conditions.lisp
xarray/basics/interface.lisp
xarray/functionality/array.lisp
xarray/functionality/view.lisp
xarray/functionality/operations.lisp
xarray/functionality/sequences.lisp
xarray/functionality/atoms.lisp
The main system appears first, followed by any subsystem dependency.
xarray
Tamas K Papp
MIT
cl-utilities
(system).
iterate
(system).
metabang-bind
(system).
anaphora
(system).
package-init
(module).
basics
(module).
functionality
(module).
Modules are listed depth-first from the system components tree.
xarray/package-init
xarray
(system).
package.lisp
(file).
xarray/basics
package-init
(module).
xarray
(system).
types.lisp
(file).
utilities.lisp
(file).
conditions.lisp
(file).
interface.lisp
(file).
xarray/functionality
basics
(module).
xarray
(system).
array.lisp
(file).
view.lisp
(file).
operations.lisp
(file).
sequences.lisp
(file).
atoms.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
xarray/xarray.asd
xarray/package-init/package.lisp
xarray/basics/types.lisp
xarray/basics/utilities.lisp
xarray/basics/conditions.lisp
xarray/basics/interface.lisp
xarray/functionality/array.lisp
xarray/functionality/view.lisp
xarray/functionality/operations.lisp
xarray/functionality/sequences.lisp
xarray/functionality/atoms.lisp
xarray/basics/types.lisp
basics
(module).
fixnum-vector
(type).
xarray/basics/utilities.lisp
types.lisp
(file).
basics
(module).
cm-index
(function).
cm-subscripts
(function).
rm-index
(function).
rm-subscripts
(function).
delete-duplicate-keywords
(function).
element-conversion-function
(function).
fill-array-with-list
(function).
flat->pairs
(function).
invert-permutation
(function).
make-symbol*
(function).
maxf
(macro).
merge-options
(function).
minf
(macro).
mklist
(function).
multf
(macro).
numeric-type-classifier
(function).
pairs->flat
(function).
permute-sequence
(function).
valid-integer-subset-p
(function).
valid-permutation-p
(function).
vector-within-dimension-p
(function).
within-dimension-p
(function).
xarray/basics/conditions.lisp
utilities.lisp
(file).
basics
(module).
xdim-invalid-axis-number
(condition).
xref-incompatible-type
(condition).
xref-setting-readonly
(condition).
xref-subscript-out-of-bounds
(condition).
xref-wrong-number-of-subscripts
(condition).
dimensions
(reader method).
rank
(reader method).
subscripts
(reader method).
subscripts
(reader method).
subscripts
(reader method).
subscripts
(reader method).
xarray/basics/interface.lisp
conditions.lisp
(file).
basics
(module).
as*
(generic function).
copy-as
(function).
xcreate
(generic function).
xcreate-similar
(function).
xdim
(generic function).
xdims
(generic function).
xelttype
(generic function).
xrank
(generic function).
xref
(generic function).
(setf xref)
(generic function).
xsetf
(generic function).
xsimilar
(generic function).
xsize
(generic function).
xarray-like
(class).
xarray/functionality/array.lisp
functionality
(module).
xarray/functionality/view.lisp
array.lisp
(file).
functionality
(module).
column-major-projection
(generic function).
drop
(function).
flat
(generic function).
flat-xview
(class).
initialize-instance
(method).
initialize-instance
(method).
original-ancestor
(function).
permutation
(generic function).
permutation-xview
(class).
print-object
(method).
xdim
(method).
xdim
(method).
xdim
(method).
xdim
(method).
xdim
(method).
xdims
(method).
xdims
(method).
xdims
(method).
xdims
(method).
xdims
(method).
xelttype
(method).
xrank
(method).
xrank
(method).
xrank
(method).
xrank
(method).
xrank
(method).
xref
(method).
xref
(method).
xref
(method).
xref
(method).
xref
(method).
(setf xref)
(method).
(setf xref)
(method).
(setf xref)
(method).
(setf xref)
(method).
xsimilar
(method).
xsize
(reader method).
xsize
(reader method).
xsize
(method).
xslice
(generic function).
(setf xslice)
(generic function).
xslice-xview
(class).
xview
(class).
ancestor
(reader method).
ancestor-dimensions
(reader method).
ancestor-dimensions
(reader method).
ancestor-dimensions
(reader method).
ancestor-subscripts
(generic function).
column-major-projection-flat-xview
(class).
column-major-projection-xview
(class).
convert-slice-subscripts
(function).
dimensions
(reader method).
dimensions
(reader method).
dimensions
(reader method).
index-specification-dimension
(function).
index-specifications
(reader method).
parse-index-specification
(function).
transpose
(generic function).
xarray/functionality/operations.lisp
view.lisp
(file).
functionality
(module).
x*
(generic function).
x+
(generic function).
x-
(generic function).
x/
(generic function).
x=
(generic function).
xcollect
(function).
xconcat
(function).
xdot
(generic function).
xmap
(function).
xmax
(generic function).
xmean
(function).
xmin
(generic function).
xop
(function).
xorder
(function).
xprod
(generic function).
xsort
(function).
xsum
(generic function).
define-elementwise-operation
(macro).
define-flat-reduction
(macro).
xdims=
(function).
xarray/functionality/sequences.lisp
operations.lisp
(file).
functionality
(module).
int-seq
(function).
int-seq
(class).
print-object
(method).
xdims
(method).
xelttype
(method).
xref
(method).
xsize
(reader method).
(setf xsize)
(writer method).
xarray/functionality/atoms.lisp
sequences.lisp
(file).
functionality
(module).
Packages are listed by definition order.
xarray
anaphora
.
cl-utilities
.
common-lisp
.
iterate
.
metabang.bind
.
as*
(generic function).
carray
(function).
carray*
(function).
cm-index
(function).
cm-subscripts
(function).
column-major-projection
(generic function).
copy-as
(function).
cvector
(function).
cvector*
(function).
drop
(function).
flat
(generic function).
flat-xview
(class).
int-seq
(function).
int-seq
(class).
original-ancestor
(function).
permutation
(generic function).
permutation-xview
(class).
rm-index
(function).
rm-subscripts
(function).
x*
(generic function).
x+
(generic function).
x-
(generic function).
x/
(generic function).
x=
(generic function).
xcollect
(function).
xconcat
(function).
xcreate
(generic function).
xcreate-similar
(function).
xdim
(generic function).
xdim-invalid-axis-number
(condition).
xdims
(generic function).
xdot
(generic function).
xelttype
(generic function).
xmap
(function).
xmax
(generic function).
xmean
(function).
xmin
(generic function).
xop
(function).
xorder
(function).
xprod
(generic function).
xrank
(generic function).
xref
(generic function).
(setf xref)
(generic function).
xref-incompatible-type
(condition).
xref-setting-readonly
(condition).
xref-subscript-out-of-bounds
(condition).
xref-wrong-number-of-subscripts
(condition).
xsetf
(generic function).
xsimilar
(generic function).
xsize
(generic function).
(setf xsize)
(generic writer).
xslice
(generic function).
(setf xslice)
(generic function).
xslice-xview
(class).
xsort
(function).
xsum
(generic function).
xview
(class).
ancestor
(generic reader).
ancestor-dimensions
(generic reader).
ancestor-subscripts
(generic function).
column-major-projection-flat-xview
(class).
column-major-projection-xview
(class).
convert-slice-subscripts
(function).
define-elementwise-operation
(macro).
define-flat-reduction
(macro).
delete-duplicate-keywords
(function).
dimensions
(generic reader).
element-conversion-function
(function).
fill-array-with-list
(function).
fixnum-vector
(type).
flat->pairs
(function).
index-specification-dimension
(function).
index-specifications
(generic reader).
invert-permutation
(function).
make-symbol*
(function).
maxf
(macro).
merge-options
(function).
minf
(macro).
mklist
(function).
multf
(macro).
numeric-type-classifier
(function).
pairs->flat
(function).
parse-index-specification
(function).
permute-sequence
(function).
rank
(generic reader).
seq
(class).
start
(generic reader).
subscripts
(generic reader).
transpose
(generic function).
valid-integer-subset-p
(function).
valid-permutation-p
(function).
vector-within-dimension-p
(function).
within-dimension-p
(function).
xarray-like
(class).
xdims=
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Return a (simple-array element-type dimensions) containing elements, coerced to element-type.
Return a (simple-array element-type dimensions) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.
Calculate the column-major flat index from subscripts (list of fixnums) and dimensions (list of fixnums). Works in the corner case when dimensions and subscripts are both nil.
Return the column-major subscripts (list) for flat index
i (fixnum), using dimensions (list of fixnums). No error checking,
for internal use only. Works in the corner case when dimension is
nil.
Convert OBJECT to CLASS as a deep copy, with the enforcement of no shared structure.
Return a (simple-array element-type (*)) containing elements, coerced to element-type.
Return a (simple-array element-type (*)) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.
Return a view with the unit dimensions dropped.
Create integer sequence 0,...,a-1 or, if b is given, a,...,b (with a<=b).
Find the original ancestor (ie the one that is not a view). Simply returns objects which are not views. Since views can be nested, this needs to follow the chain backwards.
Return a row-major flat index for given subscripts (coerced to a vector, list also accepted), using dimensions (also coerced to a vector, list also accepted). Checks for boundaries and rank.
Return i decomposed to a list of subscripts, taking
dimensions (which is coerced to a vector) as a row-major indexing
scheme. No error checking is performed, meant for internal use.
Collect the result of calling function n times into an array (type of target-spec, or determined using xsimilar). Indexing is (i ...), where i is from 0 to n-1. The rest of the indexes are determined from the first value.
Concatenate atoms and/or vectors into a vector.
If TARGET-SPEC is T or (CONS T OPTIONS), use xsimilar to determine target spec using object (and also merge options), otherwise use target-spec directly to create an object. This function is meant for internal use, when mapping functions need to determine a target spec from one of the arguments.
Apply function to arguments elementwise, and save the result in target.
Mean of the elements.
Generalized outer product of vectors, using function.
Return a vector of integers starting from 0, representing the permutation of elements in vector that would result if sorted according to predicate (which you can use in xslice, etc). Key is passed to sort. If stable-p, stable-sort is used.
Sort vector using predicate. Calls xorder and returns order as the second value.
Return an object converted to a given class, with
other properties (eg element types for arrays) as specified by the
optional keyword arguments. The result may share structure with
object, unless COPY-P. Similarly to XCREATE, class can be (cons class
options). When class is nil, XSIMILAR is called to obtain the result
type.
Usage note: libraries should specialize this method, but the user interface is AS or COPY-AS.
(eql vector)
) object copy-p options) ¶(eql array)
) object copy-p options) ¶(eql t)
) object copy-p options) ¶list
) object copy-p options) ¶Row major projection to an xrefable object. Total
size needs to match the product of dimensions. If dimensions is
omitted, it is taken to be the xsize of the object.
Flat index for an object.
flat-xview
An xview where elements can be accessed by a "flat" index on
[0,total size), but the actual mapping is
implementation-dependent. Mainly used for elementwise access
where the order of elements does not matter, especially
elementwise reductions with commutative operations (eg sum,
product, maximum, etc).
There are two special considerations for this xview: (1) it only
has to implement reading elements, not setting them, (2) it has
to implement ancestor-subscripts, which map the flat index to
that of the ancestor.
NOTE: flat-xviews do NOT have to be compatible across classes! Eg for Lisp arrays a flat-xview could be row-major, while for some other object it could be column major, etc. Only use FLAT XVIEWs if you truly don’t care about the order.
Takes an xarray-able object and creates a View which is a permutation of indexes.
Elementwise
* of two arrays, or an array and a scalar.
Elementwise
+ of two arrays, or an array and a scalar.
Elementwise
- of two arrays, or an array and a scalar.
Elementwise
/ of two arrays, or an array and a scalar.
Return non-nil if A and B have the same dimensions,, and the sup|A-B| <= eps.
Return a new object of given type and dimensions,
with additional options. Dimensions can be a list, or a single
number. xcreate can also be called as
(XCREATE (CONS CLASS OPTIONS) DIMENSIONS), in which case it will
split the cons, merge OPTIONS and call XCREATE again.
Return the size of the dim-th dim. We use the
default unless there is some sensible reason to implement
otherwise.
flat-xview
) axis-number) ¶column-major-projection-flat-xview
) axis-number) ¶column-major-projection-xview
) axis-number) ¶xslice-xview
) axis-number) ¶permutation-xview
) axis-number) ¶array
) axis-number) ¶xarray-like
) (dim integer
)) ¶Return a list of dimensions of object. The list
does not share structure with anything, so it can be freely
modified.
flat-xview
)) ¶column-major-projection-flat-xview
)) ¶column-major-projection-xview
)) ¶xslice-xview
)) ¶permutation-xview
)) ¶array
)) ¶xarray-like
)) ¶Dot product of two vectors.
Return the type of elements. If no restriction is
imposed, return T. By default, T is expected, numerically-oriented
matrices being the exception and hence different.
If there is :list-of-rows or :list-of-columns specified, then return
a list with the types for the rows or columns, respectively. These
would be a repeated list of the same type in the case of a numerical
single-typed matrix.
We do not throw an error for this not being specified - it is only specified FOR restrictions, not when there are no restrictions.
array
) &key list-of-rows list-of-columns) ¶xarray-like
) &key list-of-rows list-of-columns) ¶Maximum of the elements.
Minimum of the elements.
Product of the elements.
Returns the number of dimensions of object.
flat-xview
)) ¶column-major-projection-flat-xview
)) ¶column-major-projection-xview
)) ¶xslice-xview
)) ¶permutation-xview
)) ¶array
)) ¶xarray-like
)) ¶Accesses the element of the object specified by subscripts.
flat-xview
) &rest subscripts) ¶column-major-projection-flat-xview
) &rest subscripts) ¶column-major-projection-xview
) &rest subscripts) ¶xslice-xview
) &rest subscripts) ¶permutation-xview
) &rest subscripts) ¶array
) &rest subscripts) ¶xarray-like
) &rest subscripts) ¶Accesses the element of the object specified by subscripts.
column-major-projection-flat-xview
) &rest subscripts) ¶column-major-projection-xview
) &rest subscripts) ¶xslice-xview
) &rest subscripts) ¶permutation-xview
) &rest subscripts) ¶array
) &rest subscripts) ¶Copy the elements of source to destination.
Map-function, if given, will be used to map the elements, the
default is conversion (if necessary) with coerce.
Return (CONS CLASS OPTIONS) for creating a similar
object with new rank. If rank is T, use rank of object. NOTE: for
methods, make sure you specialize rank to fixnum if you are not
handling T.
This method needs to be clarified a bit – it is more about providing meta data for rebuilding, not about determining some notion of equalness.
array
)) ¶(eql t)
) object) ¶xarray-like
)) ¶Return the total number of elements in object.
flat-xview
)) ¶total size
column-major-projection-flat-xview
)) ¶total size
column-major-projection-xview
)) ¶array
)) ¶xarray-like
)) ¶Slice of an object.
setting a slice of an object.
Sum of the elements.
flat-xview
) &key) ¶permutation-xview
) &key) ¶error
.
error
.
:subscripts
This slot is read-only.
error
.
:subscripts
This slot is read-only.
error
.
:subscripts
This slot is read-only.
dimensions of ancestor
list
This slot is read-only.
A sequence of integers.
seq
.
vector of index specifications
xarray::fixnum-vector
:index-specifications
This slot is read-only.
dimensions, cached
xarray::fixnum-vector
:dimensions
This slot is read-only.
Defines an elementwise operation, with some default methods that return arrays.
Define a generic function named NAME which reduces its argument elementwise. body is spliced into the iterate loop, and can be used for early returns, etc. See code for variable names.
Replace with largest of the place and the given values.
Replace with smallest of the place and the given values.
Multiply (& set) the first argument by the rest.
Convert subscripts using index-specifications.
Delete conses with duplicate keywords. Destructive.
Return a conversion function that is identity if (subtypep source destination), or constructed with coerce otherwise.
Fills array with elements from list, coerced to the appropriate type. No error checking, meant to be used internally. Return array.
Transform a flat list of keyword-option pairs to a list of conses.
Return dimension of parsed index-specification. Internal function, no error checking. Return nil for dropped dimensions.
Return the inverse of a valid permutation vector (validity is not checked, results are not defined for invalid permutations).
Build a symbol by concatenating each element of ARGS, and intern it in the current package. Elements can be strings or symbols.
Merge options specifications. Duplicate pairs are removed, options that come later (both within and between arguments) are used.
Numeric type classifier, finds the smallest subtype that can accomodate the elements of list, in the ordering fixnum < integer < float < complex < t. Rational, float (any kind) are classified as double-float, and complex numbers as (complex double-float). Meant to be used by simple array-constructing functions. Upgraded-array-element-type is called on end result.
Flatten a list of conses.
Parse a index specification, returning either
- an integer i, with the dimension dropped,
- a pair (start . length), where start is the starting index, and
length is the number of valid indexes. If dimension is negative,
indexing is decreasing from start. This is used for contiguous
indexes
- a vector of indexes, for non-contiguous indexing.
All resulting indexes are valid, ie they are integers in
[0,dimension).
Range specifications:
Negative integers are interpreted as counted backwards from the right
edge of the domain, ie i < 0 denotes element dimension-i. The l
Valid index-specification specifications (a and b are integers):
a index a, dimension dropped
(list a) index a, dimension not dropped
(list a b) range between a and b, inclusive. If b < a, reversed.
:all all valid indexes, increasing order
:rev all valid indexes, decreasing order
(vector i1 ... in) vector of indexes, must be a set (no repetition).
Return permuted sequence as a list. Works even if indexes repeat.
Return non-nil (t) iff vector is a valid subset (ie with no repetition) of integers 0,1,...,(1- dimension).
Return non-nil (t) iff vector is a valid permutation of integers 0,1,...,(1- dimension).
Return non-nil iff all elements in vector are in [0,dimension).
Check if 0 <= subscript < dimension.
Return non-nil iff the dimensions of A and B are the same.
flat-xview
)) ¶dimensions of ancestor
column-major-projection-flat-xview
)) ¶dimensions of ancestor
column-major-projection-xview
)) ¶dimensions of ancestor
Map the flat index the subscripts of the ancestor.
flat-xview
) index) ¶column-major-projection-xview
)) ¶dimensions
xslice-xview
)) ¶dimensions, cached
permutation-xview
)) ¶dimensions
xref-subscript-out-of-bounds
)) ¶xslice-xview
)) ¶vector of index specifications
xref-wrong-number-of-subscripts
)) ¶rank
.
xref-incompatible-type
)) ¶xref-setting-readonly
)) ¶xref-wrong-number-of-subscripts
)) ¶xref-subscript-out-of-bounds
)) ¶Tranposed view.
dimensions of ancestor
list
:ancestor-dimensions
This slot is read-only.
length of sequence
:xsize
mixin virtual superclass to indicate support for
dispatch and generics. There should be no objects instantiated with
this class.
Simple array of one dimension, containing fixnums.
Jump to: | (
A C D E F G I M N O P R S T V W X |
---|
Jump to: | (
A C D E F G I M N O P R S T V W X |
---|
Jump to: | A D I P R S X |
---|
Jump to: | A D I P R S X |
---|
Jump to: | A B C F I M O P S T U V X |
---|
Jump to: | A B C F I M O P S T U V X |
---|