Next: Package FL.FUNCTION, Previous: Package FL.PARALLEL, Up: Reference manual [Contents][Index]

This package provides a Common Lisp version of full matrices with elements being numbers of a given type. Those classes are automatically generated when needed. It provides also part of the BLAS and LAPACK operations for those matrices. The corresponding methods are automatically compiled for the given matrix classes. The interface is very similar to the library Matlisp (Matlisp), which provides a CLOS interface to the Fortran BLAS and LAPACK routines.

- Variable:
***MZEROP-THRESHOLD*** -
Threshold below which a matrix is considered to be zero.

- Variable:
***PARALLEL-VECTOR-ALGEBRA*** -
A switch for allowing parallel linear algebra for sparse vectors in special situations.

- Variable:
***PRINT-MATRIX*** -
Maximum number of columns and/or rows to print. NIL: no elements, T: all elements.

- Variable:
***PRINT-MATRIX-ELEMENT-FORMAT*** -
Format of matrix element field to be printed. A useful format is "~10,2,2E" for debugging purposes.

- Variable:
***PRINT-TENSOR*** -
Maximum number of columns and/or rows to print. Set this to NIL to print no cells (same as *PRINT-ARRAY* set to NIL). Set this to T to print all cells of the tensor.

- Variable:
***STANDARD-MATRIX-DEFAULT-ELEMENT-TYPE*** -
Default element type for standard matrices.

- Class:
**<MATRIX>** -
General matrix class.

Superclasses: <VECTOR>

- Class:
**<SPARSE-MATRIX>** -
Abstract class for sparse matrices.

Superclasses: <MATRIX>

- Class:
**<SPARSE-TENSOR>** -
A general sparse tensor class which is implemented as a sparse vector containing full-or sparse tensor entries.

Superclasses: TENSOR

Direct slots:

- RANK: Tensor rank.
- INDICES: The (nonzero) indices of the first slot.
- ENTRIES: The (nonzero) entries of the first slot.

- Class:
**<SPARSE-VECTOR>** -
Abstract class for sparse vectors.

Superclasses: <VECTOR>

Direct slots:

- MULTIPLICITY: Multiplicity of the sparse vector. A multiplicity different from 1 is used when handling multiple right-hand sides and solutions simultaneously.

- Class:
**<SUBMATRIX>** -
Describes an ordered submatrix of a matrix. Only a restricted set of operations is allowed for these matrices and element access is slow. They are indexed with ordinary integers.

Superclasses: <MATRIX>

Direct slots:

- MATRIX: The "supermatrix".
- ROW-KEYS: The row indices of the submatrix.
- COL-KEYS: The column indices of the submatrix.

- Class:
**<VECTOR>** -
General vector class.

- Function:
**ACCESS-TYPE**`MAT`&KEY`SUGGEST``REQUIRE` -
If

`suggest`and`require`are NIL, returns which of`:row`

or`:column`

is prefered for`mat`. Otherwise determine if the order in`suggest`or`require`is acceptable without serious performance hit.

- Function:
**ADD-SVEC-TO-LOCAL-BLOCK**`SVEC``LOCAL-VEC`&OPTIONAL`KEYS``RANGES` -
Copies a local block in matlisp format into a <ht-sparse-vector>.

- Function:
**AREA-OF-SPAN**`MAT` -
Computes the volume spanned by the columns of

`mat`.

- Function:
**AVERAGE**`X`&REST`REST` -
Calculates an average of its arguments which should allow for addition and scaling.

- Function:
**AXPY**`ALPHA``X``Y` -
Returns alpha X + Y. Uses AXPY! and COPY.

- Function:
**AXPY!**`ALPHA``X``Y` -
Y <- alpha*X + Y

- Function:
**BLOCKS**`VEC` -
Returns a dictionary mapping keys to entries for

`vec`.

- Function:
**COL-KEYS**`MAT` -
All column keys for a matrix.

- Function:
**COMBINED-PROJECTION**`P1``P2` -
Returns a projection to the range of the given projections.

- Function:
**COMPRESSED->MATLISP**`CM` -
Converts a compressed matrix into matlisp format.

- Function:
**COMPRESSED-MATRIX**`TYPE` -
Construct a compressed sparse matrix with entries of

`type`.

- Class:
**COMPRESSED-MATRIX** -
A compressed sparse matrix. This is an abstract class which is made concrete by mixing it with a store-vector containing the entries.

Superclasses: <MATRIX>

Direct slots:

- PATTERN: A compressed pattern.

- Class:
**COMPRESSED-PATTERN** -
A compressed sparse pattern. Note: we use int32 vectors for

`starts`

and`indices`

, such that they do not have to be copied for a call to the alien sparse solvers.Direct slots:

- SIZES: Vector of matrix sizes, at the moment only length 2 is allowed here. The first is the dimension which is not compressed, the second is the dimension which gets compressed.
- ORIENTATION: Denotes if rows or columns are compressed.
- STARTS: Vector with start indices of compressed columns/rows.
- INDICES: Vector with compressed row/column indices.
- OFFSETS: Vector of offsets. This is only non-nil, if the pattern supports identification.

- Function:
**COPY**`X` -
Returns a deep copy of X.

- Function:
**COPY!**`X``Y` -
Y <- X

- Function:
**DET**`MAT` -
Returns the determinant of the square matrix

`mat`.

- Function:
**DET-FROM-LR**`LR``PIVOT` -
This routine computes the determinant using a given LR decomposition.

- Function:
**DIAG**`VEC` -
Returns a diagonal matrix with diagonal entries from vec.

- Function:
**DIAGONAL**`A` -
Extracts the diagonal from matrix

`A`as a vector.

- Function:
**DIAGONAL-SPARSE-TENSOR**`VALUES`&OPTIONAL`NCOMPS` -
Constructs a sparse tensor of rank 2 where

`values`is a vector of diagonal entries. If`ncomps`is given then the tensor dimension is nxn with each diagonal entry being`values`.

- Function:
**DISPLAY**`MATRIX`&KEY`ROW-ORDER``COL-ORDER``ORDER``PATTERN``STREAM`&ALLOW-OTHER-KEYS -
Formats the contents of

`matrix`in rectangular form.

- Macro:
**DOCOLS***(*`KEY``MAT`) &BODY`BODY` -
Syntax:

(docols (key mat) ...)

- Macro:
**DOROWS***(*`KEY``MAT`) &BODY`BODY` -
Syntax:

(dorows (key mat) ...)

- Function:
**DOT**`X``Y` -
Returns the dot product of X and Y.

- Function:
**DOT-ABS**`X``Y` -
Returns the dot product between |X| and |Y|.

- Macro:
**DOTENSOR***(*`ARGS``TENSOR`&KEY`DEPTH`) &BODY`BODY` -
Usage: (dotensor (entry tensor :depth 1) ...) (dotensor ((index1 ... . entry) tensor :depth 1) ...) (dotensor ((index1 ...) tensor :depth 1) ...)

- Function:
**DOUBLE-VEC***&REST*`COMPS` -
Returns a

`double-vec`

with the entries in`comps`.

- Type:
**DOUBLE-VEC** -
Uniform

`double-float`

vector.

- Macro:
**DOVEC***(*`LOOP-VARS``VEC`&OPTIONAL`RESULT`) &BODY`BODY` -
Loops on indices and entries of a vector, matrix or tensor. Examples:

(dovec (entry vec) ...) (dovec ((entry key1 ...) vec) ...)

- Function:
**ELEMENT-TYPE**`VECTOR` -
Type of the elements of the vector/matrix.

- Function:
**ELEMENTARY**`N``I``J`&OPTIONAL (`TYPE`(`QUOTE``DOUBLE-FLOAT`)) -
Returns the nxn elementary matrix with 1 at position (i,j). The value is freshly allocated.

- Function:
**ENSURE-MATLISP**`OBJ`&OPTIONAL`TYPE` -
Tries to coerce

`obj`into Matlisp format.

- Function:
**ENTRIES**`OBJECT` -
List of entries.

- Function:
**ENTRY-ALLOWED-P**`TENSOR`&REST`INDICES` -
Tests if an entry is allowed at this position.

- Function:
**EXTEND-BY-IDENTITY**`MAT``EXTEND`&KEY`IGNORE`(`COPY``T`) -
Extends A such that the keys in extend which are not in ignore are mapped to identity.

- Function:
**EXTRACT-IF**`TEST``SVEC`&KEY &ALLOW-OTHER-KEYS -
Extract a subvector or submatrix from a sparse vector/matrix. The test is a function of entry and key.

- Function:
**EXTRACT-VALUE-BLOCKS**`SOBJ``KEYS`&OPTIONAL`COL-KEYS` -
Extract a vector or array of value blocks from

`sobj`.

- Function:
**EYE**`N`&OPTIONAL (`M``N`) (`TYPE`(`QUOTE``DOUBLE-FLOAT`)) -
Returns the nxn identity matrix. The value is freshly allocated.

- Function:
**FD-LAPLACE-MATRIX**`DIM``N`&REST`KEY-ARGS` -
Short version of generating an arbitrary-dimensional FD discretization of the Laplace operator.

- Function:
**FILL!**`X``S` -
Fills X with element s.

- Function:
**FILL-RANDOM!**`X``S` -
Fills X with random values (obtained by (random s)).

- Function:
**FOR-EACH-COL-KEY**`FUNC``MAT`&KEY`PARALLEL`&ALLOW-OTHER-KEYS -
Loop through column keys.

- Function:
**FOR-EACH-ENTRY**`FUNC``VEC` -
Calls

`func`on all entries of`vec`.

- Function:
**FOR-EACH-ENTRY-AND-KEY**`FUNC``OBJECT` -
Calls

`func`on all entries of the collection`object`and their corresponding keys.

- Function:
**FOR-EACH-ENTRY-AND-VECTOR-INDEX**`FUNC``VEC` -
Calls

`func`on all entries of`vec`and their corresponding vector indices. The index used should be unserstood by`vref`

.

- Function:
**FOR-EACH-ENTRY-IN-COL**`FUNC``MAT``COL-KEY` -
Loop through entries in column col.

- Function:
**FOR-EACH-ENTRY-IN-ROW**`FUNC``MAT``ROW-KEY` -
Loop through col-keys in row.

- Function:
**FOR-EACH-KEY**`FUNC``VEC` -
Calls

`func`on all indices/keys of`vec`.

- Function:
**FOR-EACH-KEY-AND-ENTRY-IN-COL**`FUNC``MAT``COL-KEY` -
Loop through row-keys and entries in col.

- Function:
**FOR-EACH-KEY-AND-ENTRY-IN-ROW**`FUNC``MAT``ROW-KEY` -
Loop through col-keys and entries in row.

- Function:
**FOR-EACH-KEY-IN-COL**`FUNC``MAT``COL-KEY` -
Loop through row-keys in column col.

- Function:
**FOR-EACH-KEY-IN-ROW**`FUNC``MAT``ROW-KEY` -
Loop through col-keys in row.

- Function:
**FOR-EACH-ROW-KEY**`FUNC``MAT`&KEY`PARALLEL`&ALLOW-OTHER-KEYS -
Loop through row keys.

- Function:
**FULL-COMPRESSED-PATTERN**`NROWS``NCOLS`&OPTIONAL (`ORIENTATION``COLUMN`) -
Returns a full compressed pattern.

- Function:
**FULL-TENSOR**`TYPE` -
Construct a full tensor with entries of

`type`.

- Class:
**FULL-TENSOR** -
Mixin for full tensors.

Superclasses: TENSOR

Direct slots:

- DIMENSIONS: The dimensions of the tensor.
- OFFSET0: An initial offset into the store-vector which defaults to 0.
- OFFSETS: The offsets for the different dimensions. This is internal information computed at tensor construction time.

- Function:
**GEMM**`ALPHA``X``Y``BETA``Z`&OPTIONAL (`JOB``NN`) -
Rewriting of GEMM in terms of GEMM!.

- Function:
**GEMM!**`ALPHA``X``Y``BETA``Z`&OPTIONAL (`JOB``NN`) -
Dispatches on the optional job argument (member :nn :tn :nt :tt) and calls the corresponding generic function, e.g. GEMM-NN!.

- Function:
**GEMM-NN!**`A``X``Y``B``Z` -
General matrix-matrix multiplication:

*Z <- alpha * X * Y + beta * Z*

- Function:
**GEMM-NT!**`A``X``Y``B``Z` -
General matrix-matrix multiplication:

*Z <- alpha * X * Y' + beta * Z*

- Function:
**GEMM-TN!**`A``X``Y``B``Z` -
General matrix-matrix multiplication:

*Z <- alpha * X' * Y + beta * Z*

- Function:
**GEMM-TT!**`A``X``Y``B``Z` -
General matrix-matrix multiplication:

*Z <- alpha * X' * Y' + beta * Z*

- Function:
**GESV**`A``B` -
Rewriting for GESV in terms of GESV!.

- Function:
**GESV!**`A``B` -
Solves a linear system A X = B for X.

- Function:
**GETRF**`X`&OPTIONAL`IPIV` -
Rewriting for GETRF in terms of GETRF!.

- Function:
**GETRF!**`A`&OPTIONAL`IPIV` -
Computes the PA=LU decomposition of

`A`which is stored again in`A`.`ipiv`can be a pre-allocated vector which the routine fills with the indices for column pivoting, or NIL which implies that the routine allocates such a vector itself. If`ipiv`is`:none`

, no pivoting is done. Returns`A`as the first value, the pivot vector as a second value, and a boolean as the third value indicating that the decomposition succeeded.

- Function:
**GETRS**`LU``B`&OPTIONAL`IPIV` -
Rewriting for GETRS in terms of GETRS!.

- Function:
**GETRS!**`LU``B`&OPTIONAL`IPIV` -
Solves the PA=LU decomposition specified by

`LU`and`ipiv`for the rhs`b`. The result is stored in`b`.

- Function:
**GGEV**`A``B`&OPTIONAL`JOB` -
Syntax: (GGEV A B [job])

Purpose: Computes the generalized eigenvalues and left/right eigenvectors of

*A - s B*.1. (GGEV A B :N) => lambda

Computes the generalized eigenvalues of

*A - s B*.2. (GGEV A B :V) => lambda, V, W

Computes generalized eigenvalues and eigenvectors of (A - sB).

*A*V = B*V*diag(lambda), \ W'*A = diag(lambda)*W'*B*with V and W orthogonal (unitary).

Remark: The symmetric/hermitian counterpart of this routine is

`hegv`

.

- Function:
**HEGV**`A``B`&OPTIONAL`JOB` -
Syntax: (HEGV A B [job])

Purpose: Computes the generalized eigenvalues and left/right eigenvectors of

*A - s B*for Hermitian matrices A and B.1. (HEGV A B :N) => lambda

Computes the generalized eigenvalues of

*A - s B*.2. (HEGV A B :V) => lambda, V

Computes generalized eigenvalues and eigenvectors of (A - sB).

*A*V = B*V*diag(lambda), \ W'*A = diag(lambda)*W'*B*with V and W orthogonal (unitary).

Remark: The non-symmetric counterpart of this routine is

`ggev`

.

- Function:
**HYPERPLANE-NORMAL**`MAT` -
Calculates a ’normal’ nu for the n-1-dimensional hyperplane determined by the n-1 columns of the nx(n-1)-matrix

`mat`. More precisely, this is a vector nu, such that det(A|nu)=|nu|^2. This construction generalizes the cross product in 3 space dimensions.

- Function:
**IN-PATTERN-P**`TENSOR`&REST`INDICES` -
Returns T, if the indices are in the nonzero pattern.

- Function:
**INDEX-RANGE-DISJOINT-P**`MAT1``MAT2` -
Checks if the range of indices of two sparse matrices is disjoint.

- Function:
**INT-VEC***&REST*`COMPS` -
Returns a

`int-vec`

with the entries in`comps`.

- Type:
**INT-VEC** -
Uniform

`int`

vector.

- Function:
**JOIN**`ORIENTATION`&REST`MATRICES` -
Joins

`matrices`either horizontally or vertically depending on`orientation`. Due to the call to`zeros`

this is not yet a generic function.

- Function:
**JOIN-HORIZONTAL!**`RESULT`&REST`MATRICES` -
Joins

`matrices`horizontally into result.

- Function:
**JOIN-INSTANCE**`ORIENTATION``MATRIX`&REST`MATRICES` -
Compute an instance for storing the join of

`orientation`applied to matrix and matrices.

- Function:
**JOIN-VERTICAL!**`RESULT`&REST`MATRICES` -
Joins

`matrices`vertically into result.

- Function:
**KEY->SIZE**`SVEC` -
Returns NIL, if

`svec`cannot extend automatically when being accessed. Otherwise returns a function mapping keys to vector block sizes.

- Function:
**KEYS**`DIC` -
Returns a list of all keys of

`dic`.

- Function:
**KEYS-OF-COLUMN**`MAT``KEY` -
All row keys in the given column for a matrix.

- Function:
**KEYS-OF-ROW**`MAT``KEY` -
All column keys in the given row for a matrix.

- Function:
**KRONECKER-PRODUCT**`A``B` -
The Kronecker product of matrices A and B.

- Function:
**L2-NORM**`X` -
Returns the 2-norm of

`x`.

- Function:
**LAPLACE-FULL-MATRIX**`N`&OPTIONAL (`DIM`1) -
Generates the matrix for a

`dim`-dimensional Laplace problem discretized with the*2**-point stencil on a structured mesh with Dirichlet boundary conditions.`dim`+1

- Function:
**LAPLACE-SPARSE-MATRIX**`N` -
Generates a sparse matrix for a 1-dimensional Laplace problem discretized with the 3-point stencil on a structured mesh.

- Function:
**LINF-NORM**`X` -
Returns the maximum norm of

`x`.

- Function:
**LP-NORM**`X``P` -
Returns the

`p`-norm of`x`.

- Function:
**M***`X``Y` -
Multiply X by Y.

- Function:
**M*-NT**`X``Y` -
Multiply X by Y^t.

- Function:
**M*-PRODUCT-INSTANCE**`X``Y` -
Allocates an instance for the product of X and Y.

- Function:
**M*-TN**`X``Y` -
Multiply X^t by Y.

- Function:
**M*-TN-PRODUCT-INSTANCE**`X``Y` -
Allocates an instance for the product of X^t and Y.

- Function:
**M+**`X``Y` -
Returns

*X*+*Y*.

- Function:
**M+!**`X``Y` -
Y <- X + Y

- Function:
**M-**`X``Y` -
Returns X-Y. Uses AXPY.

- Function:
**M-!**`X``Y` -
Y - X -> Y. Uses AXPY!.

- Macro:
**M-INCF**`RESULT``INCREMENT` -
Adds increment to result which should be a symbol. If its value is nil then result is set to increment.

- Function:
**M.***`X``Y` -
Returns X .* Y. Uses M.*! and COPY.

- Function:
**M/**`X` -
Returns the inverse of X. Needs the identity matrix given by

`eye`

which makes this function not generally applicable.

- Function:
**MAKE-DOUBLE-VEC**`DIM`&OPTIONAL (`INIT`0.0) -
Returns a

`double-vec`

of length`dim`and initial value`init`.

- Function:
**MAKE-MATRIX***&REST*`ARGS` -
Generates a standard matrix as specified by its arguments. If two arguments are provided, they should be numbers which are interpreted as rows and columns. If only one argument is provided, it should be either a number meaning the rows and columns of a square matrix or a nested list or vector structure defining the contents matrix.

- Function:
**MAKE-REAL-MATRIX***&REST*`ARGS` -
Generates a real matrix as specified by its arguments.

- Function:
**MAKE-REAL-TENSOR**`DIMENSIONS` -
Generates an instance of a tensor with DOUBLE-FLOAT entries and the given

`dimensions`.

- Function:
**MAKE-REAL-VECTOR**`DIM`&OPTIONAL (`VALUE`0.0) -
Generates a real matrix of dimension

`dim`x 1.

- Function:
**MAT-DIFF**`X``Y` -
Prints a list of differences between X and Y.

- Function:
**MATRIX-BLOCK**`SMAT``ROW-KEY``COL-KEY` -
Low-level block lookup for a sparse block matrix.

- Function:
**MATRIX-COLUMN**`MAT``COL-KEY` -
Returns a dictionary mapping row-key to entry.

- Function:
**MATRIX-ROW**`MAT``ROW-KEY` -
Returns a dictionary mapping col-key to entry.

- Function:
**MATRIX-SLICE**`X`&KEY`FROM-ROW``FROM-COL``NROWS``NCOLS` -
Extract a submatrix of size

`nrows`*times*`ncols`out of`x`starting from position`from-row`/`from-col`.

- Function:
**MATRIX-TRANSPOSE-INSTANCE**`X` -
Returns a zero matrix for storing the transpose of X.

- Function:
**MEQUALP**`X``Y` -
Returns T if X and Y have equal entries, otherwise NIL.

- Function:
**MEXTRACT!**`X``Y``ROW-OFFSET``COL-OFFSET` -
Extract matrix X out of matrix Y from the position given by ROW-OFFSET and COL-OFFSET.

- Function:
**MIDENTITY-P**`NUMBER`&OPTIONAL`THRESHOLD` -
Returns T, if

`mat`is the identity, i.e. if the elementwise difference to the identity is not larger than`threshold`.

- Function:
**MINJECT!**`X``Y``ROW-OFFSET``COL-OFFSET` -
Inject matrix X in matrix Y at the position given by ROW-OFFSET and COL-OFFSET.

- Function:
**MRANDOM**`N`&OPTIONAL`M`(`TYPE`(`QUOTE``DOUBLE-FLOAT`)) (`RANGE`1.0) -
Returns a random nxn or (if m is provided) nxm matrix. The value is freshly allocated.

- Function:
**MREF**`A``I``J` -
Returns the matrix element

`A[i,j]`

.

- Function:
**MSQUARE-P**`MAT` -
Returns T, iff

`mat`is square.

- Function:
**MSYMMETRIC-P**`MAT`&KEY`THRESHOLD``OUTPUT` -
Returns T, if

`mat`is symmetric up to a accuracy in THRESHOLD. If output is T, the differences to symmetry are reported.

- Function:
**MULTIPLICITY**`VEC` -
We allow multiple vectors, for solving linear problems in parallel.

- Function:
**MZEROP**`X`&OPTIONAL`THRESHOLD` -
Returns T if each entry of

`x`is smaller or equal than`threshold`.

- Function:
**NCOLS**`MAT` -
Number of matrix columns.

- Function:
**NORM**`X`&OPTIONAL`P` -
Returns the

`p`-norm of`x`.

- Function:
**NORMALIZE**`X`&OPTIONAL (`P`2) -
Scales

`x`to have`p`-norm equal to 1.

- Function:
**NORMALIZE!**`X`&OPTIONAL (`P`2) -
Scales

`x`destructively to have`p`-norm equal to 1.

- Function:
**NR-OF-ENTRIES**`VECTOR` -
Total number of (block) entries for vectors.

- Function:
**NROWS**`MAT` -
Number of matrix rows.

- Function:
**NUMBER-COERCER**`NUMBER-TYPE` -
Returns a function converting a number to a number of the given number-type or recursively also a vector of numbers.

- Function:
**NUMBER-OF-NONZERO-ENTRIES**`PATTERN` -
Number of nonzero entries of a sparse matrix pattern.

- Function:
**ONES**`N`&OPTIONAL (`M``N`) (`TYPE`(`QUOTE``DOUBLE-FLOAT`)) -
Returns nxn or (if m is provided) nxm ones. The value is freshly allocated.

- Function:
**RANGE-AND-DOMAIN-DISJOINT-P**`MAT` -
Checks if index range and index domain of some matrix are disjoint.

- Function:
**RANK**`TENSOR` -
Rank of a tensor.

- Function:
**READ-COMPRESSED-MATRIX**`NROWS``NCOLS``TRIPLET-LIST`&KEY (`ORIENTATION``ROW`) (`ELEMENT-TYPE`(`QUOTE``DOUBLE-FLOAT`)) (`INDEXING``0-BASED`)`IDENTIFY-P` -
Read a compressed matrix of type

`orientation`from the given list of triplets of the form (i j Aij). If identify-p is T, try to identify entries which are equal.

- Function:
**REMOVE-COLUMN**`SMAT``COL-KEY` -
Removes a column of

`smat`.

- Function:
**REMOVE-KEY**`SOBJ`&REST`INDICES` -
Remove the entry for

`key`from the sparse object.

- Function:
**REMOVE-ROW**`SMAT``ROW-KEY` -
Removes a row of

`smat`.

- Function:
**ROW-KEYS**`MAT` -
All row keys for a matrix.

- Function:
**ROW<-ID**`A``KEY` -
Set the row of matrix A defined by KEY to identity

- Function:
**SCAL**`ALPHA``X` -
Returns alpha * X. Uses SCAL! and COPY.

- Function:
**SCAL!**`ALPHA``X` -
X <- alpha X

- Function:
**SCALAR-TYPE**`VECTOR` -
Type of the scalars for the vector class.

- Function:
**SET-SVEC-TO-LOCAL-BLOCK**`SVEC``LOCAL-VEC`&OPTIONAL`KEYS``RANGES` -
Copies a local block in matlisp format into a <sparse-vector>.

- Function:
**SHIFT-DIAGONAL-INVERTER**`ETA` -
Can be used for obtaining a diagonal modification to get ILU_mod.

- Function:
**SHIFT-TENSOR**`TENSOR``OFFSETS` -
Shifts the index range of a sparse tensor or a vector. Offsets can either be a number in which case all indices are shifted by this number or a list of the length of the tensor rank which specifies the shift for each dimension.

- Function:
**SHOW**`MATRIX`&KEY`KEYS``ZEROS``STREAM`&ALLOW-OTHER-KEYS -
Shows the contents of

`matrix`in a readable form.

- Function:
**SLICE**`TENSOR``FIXED` -
Slices

`tensor`.`fixed`determines which indices are fixed.

- Function:
**SPARSE-LDU**`A`&KEY`ORDERING``INCOMPLETE``OMEGA``DIAGONAL-INVERTER``POOL`&ALLOW-OTHER-KEYS -
Sparse LDU decomposition

- Function:
**SPARSE-M***`A``B`&KEY`JOB``SPARSITY` -
Sparse matrix-matrix or matrix-vector multiplication. Usually, m* should be used. But in situations, where A or B are very sparse, the complexity of this routine is much lower.

- Function:
**SPARSE-MATRIX->CCS**`A`&KEY`KEYS``ROW-KEYS``COL-KEYS``RANGES``ROW-RANGES``COL-RANGES` -
Converts the sparse matrix

`A`to CCS format.`row-keys`and`col-keys`may denote a submatrix,`col-ranges`and`row-ranges`may be used for extracting even subblocks of the entries.This is a rather complicated routine which has not yet been parallelized. Theoretically, this might be a bottleneck for some applications, but, practically, an appropriate case has not yet appeared.

- Function:
**SPARSE-MATRIX->MATLISP**`MAT`&KEY`KEYS``ROW-KEYS``COL-KEYS``RANGES``ROW-RANGES``COL-RANGES`&ALLOW-OTHER-KEYS -
Converts sparse matrices into matlisp format.

- Function:
**SPARSE-TENSOR**`CONTENTS` -
Constructor for

`sparse-tensor`

.

- Function:
**SPARSE-VECTOR->MATLISP**`SVEC`&OPTIONAL`KEYS``RANGES` -
Transforms all or a part of

`svec`corresponding to the keys in`keys`and maybe the ranges in ’ranges’ to a matlisp matrix.

- Function:
**STANDARD-MATRIX**`TYPE` -
Defines the programmatic class

`standard-matrix`

for element type`type`as extensions of the programmatic class`store-vector`

.

- Class:
**STANDARD-MATRIX** -
Mixin for dense matrices.

Superclasses: <MATRIX>

Direct slots:

- NROWS: Number of rows in the matrix
- NCOLS: Number of columns in the matrix

- Function:
**STANDARD-MATRIX-P**`OBJ` -
Tests if

`obj`is a`standard-matrix`

.

- Class:
**STORE-VECTOR** -
This mixin yields vector behaviour for a class containing a store. The store is a unifom array with elements of a certain type which can be determined by the funtion

`element-type`

. It often is but does not have to be equal to the type of scalars for this vector which can be obtained by calling the function`scalar-type`

.Superclasses: <VECTOR>

Direct slots:

- STORE: The vector entries.

- Function:
**SUBMATRIX**`MAT`&KEY`ROW-INDICES``COL-INDICES` -
General extraction of submatrices specified by non-adjacent lists of row- and column indices.

- Function:
**T***`TENSOR1``TENSOR2``CONTRACTION-PAIRS` -
Contracts TENSOR1 and TENSOR2 along the pairs of indices specified by CONTRACTION-PAIRS.

- Class:
**TENSOR** -
Tensor superclass.

- Function:
**TENSOR-FOR-EACH**`FUNC``TENSOR`&KEY`JOB``DEPTH`&ALLOW-OTHER-KEYS -
Applies

`func`to each index of`tensor`up to`depth`.`job`can be :entry, :index, or :both.

- Function:
**TENSOR-MAP**`FUNC``TENSOR` -
Maps

`tensor`with`func`to a tensor of the same type.

- Function:
**TENSOR-REF**`TENSOR`&REST`INDICES` -
Reader for a tensor entry.

- Function:
**TOTAL-ENTRIES**`VECTOR` -
Total number of entries for block vectors.

- Function:
**TOTAL-NROWS**`MAT` -
Total number of rows for a matrix (works also for block matrices).

- Function:
**TRANSPOSE**`X` -
Transpose the matrix

`x`.

- Function:
**TRANSPOSE!**`X``Y` -
Sets Y to the transpose of X.

- Function:
**TRANSPOSED-PATTERN**`PATTERN` -
Transpose a sparse matrix pattern.

- Function:
**UINT-VEC***&REST*`COMPS` -
Returns a

`uint-vec`

with the entries in`comps`.

- Type:
**UINT-VEC** -
Uniform

`uint`

vector.

- Function:
**UNIT-VECTOR**`DIM``I` -
Returns a freshly created copy of the

`i`-th carthesian unit vector in dimension`dim`.

- Function:
**VECTOR-BLOCK**`SVEC``KEY` -
Low-level key lookup. Returns NIL if there is no block at this position.

- Function:
**VECTOR-OF**`ETYPE` -
Flexible uniform vector type definition.

- Function:
**VECTOR-SLICE**`X``OFFSET``SIZE` -
Extract a subvector of size

`size`out of`x`starting from position`offset`.

- Function:
**VLENGTH**`VEC` -
Length of vector.

- Function:
**VREF**`X``I` -
Reader for

*x_i*.

- Function:
**X<-0**`X` -
X <- 0 X. Uses SCAL!.

- Function:
**ZEROS**`N`&OPTIONAL (`M``N`) (`TYPE`(`QUOTE``DOUBLE-FLOAT`)) -
Returns nxn or (if m is provided) nxm zeros. The value is freshly allocated.

Next: Package FL.FUNCTION, Previous: Package FL.PARALLEL, Up: Reference manual [Contents][Index]