The matlisp Reference Manual

Table of Contents

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

The matlisp Reference Manual

This is the matlisp Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 10:52:21 2019 GMT+0.


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

1 Systems

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


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

1.1 matlisp

Author

See AUTHORS

Home Page

https://github.com/matlisp/

License

LLGPL

Dependencies
Source

matlisp.asd (file)

Component

src (module)


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

2 Modules

Modules are listed depth-first from the system components tree.


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

2.1 matlisp/src

Parent

matlisp (system)

Location

src/

Components

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

2.2 matlisp/src/utilities

Dependency

conditions.lisp (file)

Parent

src (module)

Location

src/utilities/

Components

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

2.3 matlisp/src/core

Dependency

utilities (module)

Parent

src (module)

Location

src/

Components

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

2.4 matlisp/src/core/ffi

Parent

core (module)

Location

src/ffi/

Components

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

2.5 matlisp/src/core/base

Parent

core (module)

Location

src/base/

Components

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

2.6 matlisp/src/core/base/template

Dependency

base-tensor.lisp (file)

Parent

base (module)

Location

src/base/

Components

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

2.7 matlisp/src/core/base/accessor

Dependency

template (module)

Parent

base (module)

Location

src/base/

Components

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

2.8 matlisp/src/core/blas

Dependency

base (module)

Parent

core (module)

Location

src/blas/

Components

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

2.9 matlisp/src/core/blas/level-1

Dependency

maker.lisp (file)

Parent

blas (module)

Location

src/blas/

Components

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

2.10 matlisp/src/core/lapack

Dependency

blas (module)

Parent

core (module)

Location

src/lapack/

Components

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

2.11 matlisp/src/graph

Dependency

core (module)

Parent

src (module)

Location

src/graph/

Components

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

2.12 matlisp/src/special

Dependencies
Parent

src (module)

Location

src/special/

Components

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

2.13 matlisp/src/distributions

Dependencies
Parent

src (module)

Location

src/distributions/

Components

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

2.14 matlisp/src/user

Dependency

core (module)

Parent

src (module)

Location

src/user/

Components

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

2.15 matlisp/src/reader

Dependency

user (module)

Parent

src (module)

Location

src/reader/

Component

infix.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 matlisp.asd

Location

matlisp.asd

Systems

matlisp (system)


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

3.1.2 matlisp/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages
Exported Definitions

run-tests (function)


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

3.1.3 matlisp/src/conditions.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/conditions.lisp

Exported Definitions
Internal Definitions

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

3.1.4 matlisp/src/utilities/functions.lisp

Parent

utilities (module)

Location

src/utilities/functions.lisp

Exported Definitions
Internal Definitions

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

3.1.5 matlisp/src/utilities/string.lisp

Parent

utilities (module)

Location

src/utilities/string.lisp

Exported Definitions

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

3.1.6 matlisp/src/utilities/macros.lisp

Dependency

functions.lisp (file)

Parent

utilities (module)

Location

src/utilities/macros.lisp

Exported Definitions

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

3.1.7 matlisp/src/utilities/search.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/search.lisp

Exported Definitions

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

3.1.8 matlisp/src/utilities/dlist.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/dlist.lisp

Exported Definitions
Internal Definitions

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

3.1.9 matlisp/src/utilities/union-find.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/union-find.lisp

Exported Definitions

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

3.1.10 matlisp/src/utilities/hset.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/hset.lisp

Exported Definitions
Internal Definitions

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

3.1.11 matlisp/src/utilities/lvec.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/lvec.lisp

Exported Definitions

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

3.1.12 matlisp/src/utilities/template.lisp

Dependencies
Parent

utilities (module)

Location

src/utilities/template.lisp

Exported Definitions
Internal Definitions

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

3.1.13 matlisp/src/core/ffi/foreign-vector.lisp

Parent

ffi (module)

Location

src/ffi/foreign-vector.lisp

Exported Definitions
Internal Definitions

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

3.1.14 matlisp/src/core/ffi/cffi.lisp

Parent

ffi (module)

Location

src/ffi/cffi.lisp

Internal Definitions

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

3.1.15 matlisp/src/core/ffi/ffi.lisp

Parent

ffi (module)

Location

src/ffi/ffi.lisp

Exported Definitions
Internal Definitions

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

3.1.16 matlisp/src/core/base/variables.lisp

Parent

base (module)

Location

src/base/variables.lisp

Exported Definitions
Internal Definitions

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

3.1.17 matlisp/src/core/base/base-tensor.lisp

Dependency

variables.lisp (file)

Parent

base (module)

Location

src/base/base-tensor.lisp

Exported Definitions
Internal Definitions

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

3.1.18 matlisp/src/core/base/template/loopy.lisp

Parent

template (module)

Location

src/base/loopy.lisp

Exported Definitions

dorefs (macro)

Internal Definitions

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

3.1.19 matlisp/src/core/base/template/generator.lisp

Parent

template (module)

Location

src/base/generator.lisp

Exported Definitions
Internal Definitions

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

3.1.20 matlisp/src/core/base/template/numeric-template.lisp

Parent

template (module)

Location

src/base/numeric-template.lisp

Internal Definitions

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

3.1.21 matlisp/src/core/base/template/tensor-template.lisp

Dependencies
Parent

template (module)

Location

src/base/tensor-template.lisp

Exported Definitions
Internal Definitions

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

3.1.22 matlisp/src/core/base/generic.lisp

Dependency

template (module)

Parent

base (module)

Location

src/base/generic.lisp

Exported Definitions

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

3.1.23 matlisp/src/core/base/print.lisp

Dependency

generic.lisp (file)

Parent

base (module)

Location

src/base/print.lisp

Internal Definitions

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

3.1.24 matlisp/src/core/base/accessor/stride-accessor.lisp

Parent

accessor (module)

Location

src/base/stride-accessor.lisp

Exported Definitions
Internal Definitions

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

3.1.25 matlisp/src/core/base/accessor/graph-accessor.lisp

Parent

accessor (module)

Location

src/base/graph-accessor.lisp

Exported Definitions
Internal Definitions

graph-indexing! (function)


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

3.1.26 matlisp/src/core/base/accessor/coordinate-accessor.lisp

Parent

accessor (module)

Location

src/base/coordinate-accessor.lisp

Exported Definitions
Internal Definitions

coordinate-indexing (function)


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

3.1.27 matlisp/src/core/base/permutation.lisp

Dependency

generic.lisp (file)

Parent

base (module)

Location

src/base/permutation.lisp

Exported Definitions
Internal Definitions

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

3.1.28 matlisp/src/core/base/blas-helpers.lisp

Dependency

accessor (module)

Parent

base (module)

Location

src/base/blas-helpers.lisp

Internal Definitions

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

3.1.29 matlisp/src/core/base/einstein.lisp

Dependencies
Parent

base (module)

Location

src/base/einstein.lisp

Exported Definitions

einstein-sum (macro)

Internal Definitions

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

3.1.30 matlisp/src/core/base/slice.lisp

Dependencies
Parent

base (module)

Location

src/base/slice.lisp

Exported Definitions
Internal Definitions

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

3.1.31 matlisp/src/core/base/foreign.lisp

Dependencies
Parent

base (module)

Location

src/base/foreign.lisp

Exported Definitions

foreign-dense-tensor (class)

Internal Definitions

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

3.1.32 matlisp/src/core/base/boolean.lisp

Dependencies
Parent

base (module)

Location

src/base/boolean.lisp

Exported Definitions
Internal Definitions

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

3.1.33 matlisp/src/core/blas/maker.lisp

Parent

blas (module)

Location

src/blas/maker.lisp

Exported Definitions

zeros (function)

Internal Definitions

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

3.1.34 matlisp/src/core/blas/level-1/copy.lisp

Parent

level-1 (module)

Location

src/blas/copy.lisp

Exported Definitions
Internal Definitions

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

3.1.35 matlisp/src/core/blas/level-1/dot.lisp

Parent

level-1 (module)

Location

src/blas/dot.lisp

Exported Definitions
Internal Definitions

t/dot (macro)


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

3.1.36 matlisp/src/core/blas/level-1/axpy.lisp

Dependency

copy.lisp (file)

Parent

level-1 (module)

Location

src/blas/axpy.lisp

Exported Definitions
Internal Definitions

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

3.1.37 matlisp/src/core/blas/level-1/scal.lisp

Dependency

copy.lisp (file)

Parent

level-1 (module)

Location

src/blas/scal.lisp

Exported Definitions
Internal Definitions

t/scdi! (macro)


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

3.1.38 matlisp/src/core/blas/level-1/realimag.lisp

Dependency

copy.lisp (file)

Parent

level-1 (module)

Location

src/blas/realimag.lisp

Exported Definitions

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

3.1.39 matlisp/src/core/blas/level-1/transpose.lisp

Dependencies
Parent

level-1 (module)

Location

src/blas/transpose.lisp

Exported Definitions

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

3.1.40 matlisp/src/core/blas/level-1/sum.lisp

Dependencies
Parent

level-1 (module)

Location

src/blas/sum.lisp

Exported Definitions
Internal Definitions

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

3.1.41 matlisp/src/core/blas/gem.lisp

Dependency

level-1 (module)

Parent

blas (module)

Location

src/blas/gem.lisp

Exported Definitions
Internal Definitions

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

3.1.42 matlisp/src/core/blas/ger.lisp

Dependency

level-1 (module)

Parent

blas (module)

Location

src/blas/ger.lisp

Exported Definitions
Internal Definitions

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

3.1.43 matlisp/src/core/blas/trs.lisp

Parent

blas (module)

Location

src/blas/trs.lisp

Exported Definitions
Internal Definitions

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

3.1.44 matlisp/src/core/lapack/lu.lisp

Parent

lapack (module)

Location

src/lapack/lu.lisp

Exported Definitions
Internal Definitions

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

3.1.45 matlisp/src/core/lapack/chol.lisp

Parent

lapack (module)

Location

src/lapack/chol.lisp

Exported Definitions
Internal Definitions

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

3.1.46 matlisp/src/core/lapack/qr.lisp

Parent

lapack (module)

Location

src/lapack/qr.lisp

Exported Definitions
Internal Definitions

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

3.1.47 matlisp/src/core/lapack/least-squares.lisp

Parent

lapack (module)

Location

src/lapack/least-squares.lisp

Exported Definitions
Internal Definitions

t/lapack-gelsy! (macro)


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

3.1.48 matlisp/src/core/lapack/eig.lisp

Parent

lapack (module)

Location

src/lapack/eig.lisp

Exported Definitions
Internal Definitions

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

3.1.49 matlisp/src/core/lapack/schur.lisp

Parent

lapack (module)

Location

src/lapack/schur.lisp

Exported Definitions
Internal Definitions

t/lapack-gees! (macro)


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

3.1.50 matlisp/src/core/lapack/svd.lisp

Parent

lapack (module)

Location

src/lapack/svd.lisp

Exported Definitions
Internal Definitions

t/lapack-gesvd! (macro)


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

3.1.51 matlisp/src/core/lapack/syl.lisp

Dependency

schur.lisp (file)

Parent

lapack (module)

Location

src/lapack/syl.lisp

Exported Definitions
Internal Definitions

t/lapack-trsyl! (macro)


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

3.1.52 matlisp/src/graph/fibonacci.lisp

Parent

graph (module)

Location

src/graph/fibonacci.lisp

Exported Definitions
Internal Definitions

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

3.1.53 matlisp/src/graph/dfs.lisp

Parent

graph (module)

Location

src/graph/dfs.lisp

Internal Definitions

clause-for-in-graph-4 (macro)


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

3.1.54 matlisp/src/graph/graph.lisp

Dependencies
Parent

graph (module)

Location

src/graph/graph.lisp

Exported Definitions
Internal Definitions

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

3.1.55 matlisp/src/graph/graphviz.lisp

Dependencies
Parent

graph (module)

Location

src/graph/graphviz.lisp

Exported Definitions

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

3.1.56 matlisp/src/special/map.lisp

Parent

special (module)

Location

src/special/map.lisp

Exported Definitions
Internal Definitions

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

3.1.57 matlisp/src/special/norm.lisp

Parent

special (module)

Location

src/special/norm.lisp

Exported Definitions

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

3.1.58 matlisp/src/special/misc.lisp

Parent

special (module)

Location

src/special/misc.lisp

Exported Definitions
Internal Definitions

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

3.1.59 matlisp/src/special/poly.lisp

Parent

special (module)

Location

src/special/poly.lisp

Exported Definitions

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

3.1.60 matlisp/src/special/optimize.lisp

Parent

special (module)

Location

src/special/optimize.lisp

Internal Definitions

optimize-expression (macro)


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

3.1.61 matlisp/src/special/orthogonal-polynomial.lisp

Parent

special (module)

Location

src/special/orthogonal-polynomial.lisp

Exported Definitions
Internal Definitions

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

3.1.62 matlisp/src/distributions/random.lisp

Parent

distributions (module)

Location

src/distributions/random.lisp

Exported Definitions
Internal Definitions

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

3.1.63 matlisp/src/distributions/ziggurat.lisp

Parent

distributions (module)

Location

src/distributions/ziggurat.lisp

Internal Definitions

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

3.1.64 matlisp/src/distributions/exponential.lisp

Dependencies
Parent

distributions (module)

Location

src/distributions/exponential.lisp

Exported Definitions
Internal Definitions

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

3.1.65 matlisp/src/distributions/erdos-renyi.lisp

Dependency

random.lisp (file)

Parent

distributions (module)

Location

src/distributions/erdos-renyi.lisp

Internal Definitions

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

3.1.66 matlisp/src/user/arithmetic.lisp

Parent

user (module)

Location

src/user/arithmetic.lisp

Exported Definitions
Internal Definitions

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

3.1.67 matlisp/src/user/function.lisp

Parent

user (module)

Location

src/user/function.lisp

Exported Definitions
Internal Definitions

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

3.1.68 matlisp/src/reader/infix.lisp

Parent

reader (module)

Location

src/reader/infix.lisp

Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 matlisp-user

MATLISP USER

Source

package.lisp (file)

Nickname

t

Use List
Exported Definitions
Internal Definitions

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

4.2 matlisp-fibonacci

Source

package.lisp (file)

Nickname

fib

Use List
Exported Definitions
Internal Definitions

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

4.3 matlisp-infix

Source

package.lisp (file)

Use List
Internal Definitions

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

4.4 matlisp

MATLISP routines

Source

package.lisp (file)

Nickname

m

Use List
Used By List
Exported Definitions
Internal Definitions

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

4.5 matlisp-ffi

Fortran foreign function interface

Source

package.lisp (file)

Use List
Used By List

matlisp

Exported Definitions
Internal Definitions

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

4.6 matlisp-tests

MATLISP TESTS

Source

package.lisp (file)

Use List
Exported Definitions

run-tests (function)


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

4.7 matlisp-conditions

Source

package.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

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

4.8 matlisp-hash-set

Source

package.lisp (file)

Nickname

matlisp-hset

Use List
Exported Definitions
Internal Definitions

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

4.9 matlisp-utilities

Source

package.lisp (file)

Nickname

mu

Use List
Used By List
Exported Definitions
Internal Definitions

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

4.10 matlisp-template

Source

package.lisp (file)

Use List
Used By List

matlisp

Exported Definitions
Internal Definitions

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

4.11 matlisp-union-find

Source

package.lisp (file)

Nickname

matlisp-ufd

Use List
Exported Definitions

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

4.12 matlisp-dlist

Source

package.lisp (file)

Nickname

dlist

Use List
Used By 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 Constants

Constant: +infinity+
Package

matlisp

Source

variables.lisp (file)


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

5.1.2 Special variables

Special Variable: *check-after-initializing?*

If t, then check for invalid values in the field of
the class in the :after specialized method (if defined), else do nothing. One ought to be very carful when doing, much of Matlisp’s code is written on the assumption that the fields of a tensor don’t take invalid values; failing which case, may lead to memory error. Use at your own risk.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *complex-l1-fcall-lb*

If the size of the array is less than this parameter, the
lisp version of axpy is called in order to avoid FFI overheads. The Fortran function is not called if the tensor does not have a consecutive store (see blas-helpers.lisp/consecutive-store-p).

Package

matlisp

Source

variables.lisp (file)

Special Variable: *complex-l2-fcall-lb*

If the maximum dimension in the MV is lower than this parameter, then the lisp code is used by default, instead of calling BLAS. Used to avoid the FFI overhead when calling MM with small matrices. Note that if the dimensions do exceed this lower bound, then the Fortran function is called even when the matrices have a BLAS incompatible stride (by using a copy).

Default set with SBCL on x86-64 linux. A reasonable value is something between 400 and 1000.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *complex-l3-fcall-lb*

If the maximum dimension in the MM is lower than this parameter, then the lisp code is used by default, instead of calling BLAS. Used to avoid the FFI overhead when calling MM with small matrices.
Default set with SBCL on x86-64 linux. A reasonable value is something between 20 and 200.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *default-sparse-store-increment*

Determines the increment by which the store of a compressed sparse matrix is increased, when it runs out of store.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *default-sparsity*

Determines the default sparsity for a newly created sparse matrix, when the number of non-zero is not specified.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *default-stride-ordering*

Determines whether strides are row or column major by default. Doing:
> (let ((*default-stride-ordering* :col-major)) (make-real-tensor 10 10))
returns a 10x10 matrix with Column major order.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *default-tensor-type*
Package

matlisp

Source

variables.lisp (file)

Special Variable: *default-uplo*

For routines which take symmetric (hermitian) matrices as arguments, this sets the default argument for UPLO.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *max-sparse-size*

Upper bounds the store size for a newly created sparse matrix, when the number of non-zero is not specified.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *rcond-scale*

Factor by which the float-epsilon is to be scaled, so as to obtain a condition number threshold, to be used for determining the rank of a matrix (used in gelsy).

Package

matlisp

Source

variables.lisp (file)

Special Variable: *real-l1-fcall-lb*

If the size of the array is less than this parameter, the
lisp version of axpy is called in order to avoid FFI overheads. The Fortran function is not called if the tensor does not have a consecutive store (see blas-helpers.lisp/consecutive-store-p).

Package

matlisp

Source

variables.lisp (file)

Special Variable: *real-l2-fcall-lb*

If the maximum dimension in the MV is lower than this parameter, then the lisp code is used by default, instead of calling BLAS. Used to avoid the FFI overhead when calling MM with small matrices. Note that if the dimensions do exceed this lower bound, then the Fortran function is called even if the matrix has a BLAS incompatible stride (by doing a copy).

Default set with SBCL on x86-64 linux. A reasonable value is something between 800 and 2000.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *real-l3-fcall-lb*

If the maximum dimension in the MM is lower than this parameter, then the lisp code is used by default, instead of calling BLAS. Used to avoid the FFI overhead when calling MM with small matrices.
Default set with SBCL on x86-64 linux. A reasonable value is something between 20 and 200.

Package

matlisp

Source

variables.lisp (file)

Special Variable: *sparse-tensor-realloc-on-setf*
Package

matlisp

Source

variables.lisp (file)


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

5.1.3 Macros

Macro: binding-gensyms (MNAME &optional FNAME) &body BODY
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: cart-case (&rest VARS) &body CASES
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: cart-ecase (&rest VARS) &body CASES
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: cart-etypecase VARS &body CASES
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: cart-typecase VARS &body CASES
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: define-tensor-method NAME (&rest ARGS) &body BODY
Package

matlisp

Source

generator.lisp (file)

Macro: definline NAME &body REST

Creates a function and declaims them inline: short form for defining an inlined function.

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: deft/generic (NAME PREDICATE &optional SORTER SORT-FUNCTION) DISP ARGS
Package

matlisp-template

Source

template.lisp (file)

Macro: deft/method NAME DISP ARGS &rest BODY
Package

matlisp-template

Source

template.lisp (file)

Macro: dorefs (IDX DIMS &key LOOP-ORDER UPLO?) (&rest REF-DECLS) &rest BODY
Package

matlisp

Source

loopy.lisp (file)

Macro: dpop DLL
Package

matlisp-dlist

Source

dlist.lisp (file)

Macro: dpush OBJ DLL
Package

matlisp-dlist

Source

dlist.lisp (file)

Macro: einstein-sum TYPE IDX-ORDER PLACE CLAUSE &optional TESTP
Package

matlisp

Source

einstein.lisp (file)

Macro: eval-every &body FORMS
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: ffuncall NAME-&-RETURN-TYPE &rest ARGS

This macro provides a thin wrapper around cffi:foreign-funcall for making calls to Fortran functions that much easier. We use the F2C convention, which isn’t really followed by compilers when returning complex values (so be wary of complex number returning functions).

(FFUNCALL (name &optional (return-type :void) (mode :f2c)) *[type arg])

If (eq mode :f2c) then a name mangler is called on name, and string lengths are appended at the
end of the argument to the foreign function. Neither of this is done if (eq mode :c).

Type (credits for aesthetics goes to CCL) is of the general form:
type -> Pass by value.
(:& type &key output) -> Pass by reference, if ’output’ return value after exiting from foreign function. (:* type &key +) -> Pointer/Array/Foreign-vector, if ’+’ increment pointer by ’+’ times foreign-type-size. There are restrictions as to what types can be used with ’(:& :*), see source of lisp->mffi and mffi->lisp.

Example:
@lisp
> (let ((a (make-array 4 :element-type ’double-float :initial-contents ’(1d0 2d0 3d0 4d0))))
(ffuncall ("zdotc" :double-float) (:& :integer) (/ (length a) 2)
(:* :complex-double-float) a (:& :integer) 1
(:* :complex-double-float) a (:& :integer) 1))
=> 30d0
> (let ((a (make-array 4 :element-type ’double-float :initial-contents ’(1d0 2d0 3d0 4d0))))
(ffuncall ("ddot" :double-float) (:& :integer) (length a)
(:* :double-float) a (:& :integer) 1
(:* :double-float) a (:& :integer) 1))
=> 30d0
@end lisp

Package

matlisp-ffi

Source

ffi.lisp (file)

Macro: fold-tensor INDEX (TENSOR INITIAL) &rest BODY
Package

matlisp

Source

map.lisp (file)

Macro: gethash! KEY TABLE DEFAULT
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: graphfib (G GRAPH &key ORDER ITERATE BLOCK-NAME) INIT UPDATE &rest BODY
Package

matlisp

Source

graph.lisp (file)

Macro: let*-typed BINDINGS &body BODY

This macro works basically like let*, but also allows type-declarations with the key :type.

Example:
@lisp
> (macroexpand-1
‘(let*-typed ((x 1 :type fixnum))
(+ 1 x)))
=> (LET* ((X 1))
(DECLARE (TYPE FIXNUM X))
(+ 1 X))
@end lisp

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: let-typed BINDINGS &body BODY

This macro works basically like let, but also allows type-declarations with the key :type.

Example:
@lisp
> (macroexpand-1
‘(let-typed ((x 1 :type fixnum))
(+ 1 x)))
=> (LET ((X 1))
(DECLARE (TYPE FIXNUM X))
(+ 1 X))
@end lisp

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: letv* BINDINGS &body BODY

This macro extends the syntax of let* to handle multiple values and destructuring bind,
it also handles type declarations. The declarations list @arg{vars} is similar to that in let: look at the below examples.

Examples:
@lisp
> (macroexpand-1 ‘(letv* ((x 2 :type fixnum)
((a &optional (c 2)) b (values (list 1) 3) :type (fixnum &optional (t)) t)) t))
=> (LET ((X 2))
(DECLARE (TYPE FIXNUM X))
(MULTIPLE-VALUE-BIND (#:G1120 B) (VALUES (LIST 1) 3)
(DECLARE (TYPE T B))
(DESTRUCTURING-BIND (A &OPTIONAL (C 2)) #:G1120
(DECLARE (TYPE FIXNUM A)
(TYPE T C))
(LOCALLY T))))
@end lisp

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: memoizing &rest BODY
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: rec NAME ARGS &body BODY
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: recurse-maadi X MATCH &body DISPATCHERS
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: set-slots OBJ &rest DECL
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: using-gensyms (DECL (&rest SYMS) &optional GENSYMS) &body BODY
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: values-append &rest VALUES
Package

matlisp-utilities

Source

functions.lisp (file)

Macro: values-n N &rest VALUES
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: very-quickly &body FORMS

Macro which encloses @arg{forms} inside (declare (optimize (speed 3) (safety 0) (space 0)))

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: with-memoization (&optional HASH-TABLE) &body BODY
Package

matlisp-utilities

Source

macros.lisp (file)

Macro: with-optimization (&rest ARGS) &body BODY

Macro creates a local environment with optimization declarations, and executes form.

Example:
@lisp
> (macroexpand-1
‘(with-optimization (:speed 2 :safety 3)
(+ 1d0 2d0)))
=> (LOCALLY (DECLARE (OPTIMIZE (SPEED 2) (SAFETY 3))) (+ 1.0d0 2.0d0)) @end lisp

Package

matlisp-utilities

Source

macros.lisp (file)

Macro: ziprm (R M) &body ARGS

Does reduce-map on @arg{args}.

Example:
@lisp
> (macroexpand-1
‘(ziprm (and =) (a b c) (1 2 3))) => (AND (= A 1) (= B 2) (= C 3)) @end lisp

Package

matlisp-utilities

Source

macros.lisp (file)


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

5.1.4 Compiler macros

Compiler Macro: * &rest OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: + &rest OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: - OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: .* &rest OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: ./ OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: / OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: = OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: @ &rest OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Compiler Macro: binary-search VAL LB UB VEC &key ORDER TEST
Package

matlisp-utilities

Source

search.lisp (file)

Compiler Macro: fvref X I
Package

matlisp-ffi

Source

foreign-vector.lisp (file)

Compiler Macro: gem ALPHA A B BETA C &optional JOB
Package

matlisp

Source

gem.lisp (file)

Compiler Macro: gem! ALPHA A B BETA C &optional JOB
Package

matlisp

Source

gem.lisp (file)

Compiler Macro: lvec-copy N IN OF/IN OUT OF/OUT &key KEY LOCK
Package

matlisp-utilities

Source

lvec.lisp (file)

Compiler Macro: sort-index SEQ PREDICATE &key KEY
Package

matlisp-utilities

Source

search.lisp (file)

Compiler Macro: OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)


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

5.1.5 Functions

Function: * &rest OBJECTS &aux RET
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: + &rest OBJECTS &aux RET
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: - OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: .* &rest OBJECTS &aux RET
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: ./ OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: / OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: = OBJECT &rest MORE-OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: @ &rest OBJECTS &aux RET
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: acos X
Package

matlisp-user

Source

function.lisp (file)

Function: acos! X
Package

matlisp-user

Source

function.lisp (file)

Function: acosh X
Package

matlisp-user

Source

function.lisp (file)

Function: acosh! X
Package

matlisp-user

Source

function.lisp (file)

Function: adlist->graph AG &optional TYPE &aux TYPE
Package

matlisp

Source

graph.lisp (file)

Function: asin X
Package

matlisp-user

Source

function.lisp (file)

Function: asin! X
Package

matlisp-user

Source

function.lisp (file)

Function: asinh X
Package

matlisp-user

Source

function.lisp (file)

Function: asinh! X
Package

matlisp-user

Source

function.lisp (file)

Function: atan Y &optional X
Package

matlisp-user

Source

function.lisp (file)

Function: atan! Y &optional X
Package

matlisp-user

Source

function.lisp (file)

Function: atanh X
Package

matlisp-user

Source

function.lisp (file)

Function: atanh! X
Package

matlisp-user

Source

function.lisp (file)

Function: binary-search VAL LB UB VEC &key ORDER TEST
Package

matlisp-utilities

Source

/builds/quickref/quickref/bin/declt

Function: cart LIST &rest MORE-LISTS
Package

matlisp-utilities

Source

functions.lisp (file)

Function: chol A &optional UPLO
Package

matlisp

Source

chol.lisp (file)

Function: chol! A &optional UPLO
Package

matlisp

Source

chol.lisp (file)

Function: compile-and-eval SOURCE

Compiles and evaluates the given @arg{source}. This should be an ANSI compatible way of ensuring method compilation.

Package

matlisp-utilities

Source

functions.lisp (file)

Function: conjugate A

Syntax
======
(t:conjugate A)

Purpose
=======
Like conjugate!, but non-destructive.

Package

matlisp-user

Source

transpose.lisp (file)

Function: conjugate! A

Syntax
======
(t:conjugate! A)

Purpose
=======
Destructively modifies A into its complex conjugate (not hermitian conjugate).

(t:imagpart~ A) <- (- (t:imagpart~ A))

Package

matlisp-user

Source

transpose.lisp (file)

Function: copy OBJ &optional TYPE
Package

matlisp

Source

generic.lisp (file)

Function: cos X
Package

matlisp-user

Source

function.lisp (file)

Function: cos! X
Package

matlisp-user

Source

function.lisp (file)

Function: cosh X
Package

matlisp-user

Source

function.lisp (file)

Function: cosh! X
Package

matlisp-user

Source

function.lisp (file)

Function: ctranspose A &optional PERMUTATION

Syntax
======
(CTRANSPOSE A [permutation])

Purpose
=======
Like CTRANSPOSE!, but non-destructive.

Package

matlisp

Source

transpose.lisp (file)

Function: ctranspose! A &optional PERMUTATION

Syntax
======
(CTRANSPOSE! A [permutation])

Purpose
=======
Hermitian transpose of A (destructive).

Package

matlisp

Source

transpose.lisp (file)

Function: dappend! &rest DLSTS
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: dcar BUF
Function: (setf dcar) VALUE BUF
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: dcdr BUF
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: dcons OBJ
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: decrease-key ID KEY FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: degree G
Package

matlisp

Source

graph.lisp (file)

Function: delete-node ID FIB &optional DELETE?
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: diag TENSOR &optional ORDER
Package

matlisp

Source

misc.lisp (file)

Function: dijkstra G &optional START
Package

matlisp

Source

graph.lisp (file)

Function: dijkstra-prims G &optional START
Package

matlisp

Source

graph.lisp (file)

Function: dimensions X &optional IDX
Package

matlisp

Source

base-tensor.lisp (file)

Function: directed-subgraph G
Package

matlisp

Source

graph.lisp (file)

Function: display-graph GRAPH &optional SELF-LOOPS NODE-NAME &aux NAME DOT-NAME SVG-NAME
Package

matlisp

Source

graphviz.lisp (file)

Function: dlist &rest OBJS
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: drdc BUF
Package

matlisp-dlist

Source

dlist.lisp (file)

Function: eig X &optional JOB UPLO
Package

matlisp

Source

eig.lisp (file)

Function: ensure-hset TBL &optional TEST
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: exp X
Package

matlisp-user

Source

function.lisp (file)

Function: exp! X
Package

matlisp-user

Source

function.lisp (file)

Function: expt BASE POWER
Package

matlisp-user

Source

function.lisp (file)

Function: expt! BASE POWER
Package

matlisp-user

Source

function.lisp (file)

Function: extract-min FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: eye DIMS &optional TYPE
Package

matlisp

Source

misc.lisp (file)

Function: eye! TENSOR
Package

matlisp

Source

misc.lisp (file)

Function: fence G &optional IDX
Package

matlisp

Source

graph-accessor.lisp (file)

Function: file->string PATH

Sucks up an entire file from PATH into a freshly-allocated string, returning two values: the string and the number of bytes read.

Package

matlisp-utilities

Source

string.lisp (file)

Function: foreign-vector ELEMENT-TYPE
Package

matlisp-ffi

Source

foreign-vector.lisp (file)

Function: fvref X I
Function: (setf fvref) VALUE X I
Package

matlisp-ffi

Source

foreign-vector.lisp (file)

Function: gauss-quadrature N P

Computes knot points and quadrature weights by diagonalizing the Jacobi operator associated with the orthogonal polynomial [1,2].

[1] Golub, Gene H., and John H. Welsch. "Calculation of Gauss quadrature rules." Mathematics of computation 23.106 (1969): 221-230. [2] Srinivasan, Akshay. "Spectral Methods: Applications to Quantum Mechanics and Flow Stability." B.Tech thesis, NITK, Surathkal

Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Function: geev-complexify-eigvec EIGVAL EIGVEC
Package

matlisp

Source

eig.lisp (file)

Function: get-orthogonal-polynomial NAME
Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Function: graph->dot STREAM G &optional SELF-LOOPS NODE-NAME
Package

matlisp

Source

graphviz.lisp (file)

Function: head X
Package

matlisp

Source

stride-accessor.lisp (file)

Function: hset SEQUENCE-OR-ELEMENT &optional TEST &aux TABLE
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset->list HSET
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset-difference! TBL1 TBL2 &aux TBL1
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset-intersection! TBL1 TBL2 &aux TBL1
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset-memberp ELEMENT TABLE
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset-union! TBL1 TBL2 &aux TBL1
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset= TBL1 TBL2
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hyper->bipartite HH &optional TYPE FULL
Package

matlisp

Source

graph.lisp (file)

Function: idxv &rest CONTENTS
Package

matlisp

Source

permutation.lisp (file)

Function: imagpart TENSOR

Syntax
======
(t:imagpart tensor)

Purpose
=======
Returns a new tensor object which points to the real part of TENSOR. Store is shared with TENSOR.

If TENSOR is a scalar, returns its real part.

Package

matlisp-user

Source

realimag.lisp (file)

Function: imagpart~ TENSOR

Syntax
======
(t:imagpart~ tensor)

Purpose
=======
Returns a new tensor object which points to the imaginary part of the TENSOR, if it is complex valued, otherwise returns NIL.

Store is shared with TENSOR.

If TENSOR is a scalar, returns its imaginary part.

Package

matlisp-user

Source

realimag.lisp (file)

Function: index ITEM UFD
Package

matlisp-union-find

Source

union-find.lisp (file)

Function: indices X &optional IDX
Package

matlisp

Source

coordinate-accessor.lisp (file)

Function: infer-type EXPR ENV
Package

matlisp-utilities

Source

functions.lisp (file)

Function: insert-key KEY FIB &optional ID
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: join AXIS TENSOR &rest MORE-TENSORS
Package

matlisp

Source

slice.lisp (file)

Function: ldl A &optional HERMITIAN? UPLO
Package

matlisp

Source

chol.lisp (file)

Function: ldl-permute! M IPIV &optional UPLO
Package

matlisp

Source

chol.lisp (file)

Function: line-graph HH
Package

matlisp

Source

graph.lisp (file)

Function: linspace START END &optional NUM-POINTS LIST-OUTPUTP
Package

matlisp

Source

misc.lisp (file)

Function: lisp->mffi TYPE

Convert the given matlisp-ffi type into one understood by Lisp

Package

matlisp-ffi

Source

ffi.lisp (file)

Function: log BASE &optional POWER
Package

matlisp-user

Source

function.lisp (file)

Function: log! BASE &optional POWER
Package

matlisp-user

Source

function.lisp (file)

Function: lstsq A B &optional RCOND
Package

matlisp

Source

least-squares.lisp (file)

Function: lu A &optional SPLIT-LU?

Syntax
======
(LU a split-lu?)

Purpose
=======
Computes the LU decomposition of A.

This functions is an interface to GETRF!

If SPLIT-LU? is T, then return (L, U, P), otherwise returns (LU, P).

Package

matlisp

Source

lu.lisp (file)

Function: lvec->list VA
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec->list! VA LA
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-copy N IN OF/IN OUT OF/OUT &key KEY LOCK
Package

matlisp-utilities

Source

/builds/quickref/quickref/bin/declt

Function: lvec-eq VA VB &optional TEST
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-foldl FUNC VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-foldr FUNC VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-map-foldl! FUNC VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-map-foldr! FUNC VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-max VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: lvec-min VEC
Package

matlisp-utilities

Source

lvec.lisp (file)

Function: make-extensible-array &optional ELEMENT-TYPE
Package

matlisp-utilities

Source

functions.lisp (file)

Function: make-heap &optional FUNC TEST
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: map-tensor FUNC X &optional OUTPUT-TYPE
Package

matlisp

Source

map.lisp (file)

Function: mapcart FUNCTION LIST &rest MORE-LISTS
Package

matlisp-utilities

Source

functions.lisp (file)

Function: mapslice AXIS FUNC TENSOR &rest MORE-TENSORS
Package

matlisp

Source

map.lisp (file)

Function: mapslicec~ AXIS FUNC TENSOR &rest MORE-TENSORS
Package

matlisp

Source

map.lisp (file)

Function: mapslice~ AXIS FUNC TENSOR &rest MORE-TENSORS
Package

matlisp

Source

map.lisp (file)

Function: maptree KEYS TRANSFORMER TREE
Package

matlisp-utilities

Source

functions.lisp (file)

Function: maptree-eki TRANSFORMER TREE
Package

matlisp-utilities

Source

functions.lisp (file)

Function: maptree-if PREDICATE TRANSFORMER TREE

Returns a new tree by recursively calling @arg{transformer} on sub-trees which satisfy the @arg{predicate}. @arg{predicate} : tree -> boolean
@arg{transformer}: tree -> (or tree atom) *control
If the transformer returns a @arg{control} function, then the tree returned by
the transformer is replaced in-turn by the result of:
> (funcall @arg{control} #’(lambda (x) (maptree-if @arg{predicate} @arg{transformer} x)) transformed-tree) , otherwise it is left as it is.

Example:
@lisp
> (maptree-if #’(λ (x) (and (consp x) (eq (car x) ’ping)))
#’(λ (x) ‘(pong ,@(cdr x)))
’(progn (ping (ping (ping 1)))))
>= (PROGN (PONG (PING (PING 1))))
> (maptree-if #’(λ (x) (and (consp x) (eq (car x) ’ping)))
#’(λ (x) (values ‘(pong ,@(cdr x)) #’mapcar))
’(progn (ping (ping (ping 1)))))
>= (PROGN (PONG (PONG (PONG 1))))
@end lisp

Package

matlisp-utilities

Source

functions.lisp (file)

Function: matrixify~ VEC &optional COL-VECTOR?
Package

matlisp

Source

slice.lisp (file)

Function: max-dag G

1/2 approximation to the Maximum acyclic subgraph problem (anything better is NP-hard assuming UGC).

Package

matlisp

Source

graph.lisp (file)

Function: memos X
Package

matlisp

Source

base-tensor.lisp (file)

Function: meshgrid A B
Package

matlisp

Source

misc.lisp (file)

Function: mffi->lisp TYPE

Convert the given matlisp-ffi type into one understood by CFFI.

Package

matlisp-ffi

Source

ffi.lisp (file)

Function: min-key FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: modproj I D &optional OPEN? DEF
Package

matlisp-utilities

Source

functions.lisp (file)

Function: moralize! ADG
Package

matlisp

Source

graph.lisp (file)

Function: neighbors G &optional I J
Package

matlisp

Source

graph-accessor.lisp (file)

Function: node-existsp ID FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: node-key ID FIB
Function: (setf node-key) VALUE ID FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: normalize! X &optional N
Package

matlisp

Source

sum.lisp (file)

Function: ones DIMS &optional TYPE
Package

matlisp

Source

misc.lisp (file)

Function: order X
Package

matlisp

Source

base-tensor.lisp (file)

Function: order->tree ORDER &optional TYPE SYMMETRICP
Package

matlisp

Source

graph.lisp (file)

Function: orphanize X
Package

matlisp

Source

base-tensor.lisp (file)

Function: pair LIST &optional N
Package

matlisp-utilities

Source

functions.lisp (file)

Function: permutation* A B
Package

matlisp

Source

permutation.lisp (file)

Function: permutation/ A
Package

matlisp

Source

permutation.lisp (file)

Function: permute THING PERM &optional ARG
Package

matlisp

Source

permutation.lisp (file)

Function: pick-random K N
Package

matlisp

Source

permutation.lisp (file)

Function: polyfit OBSERVATIONS &optional N &aux OBSERVATIONS
Package

matlisp

Source

poly.lisp (file)

Function: polyval TT POLY &aux RET
Package

matlisp

Source

poly.lisp (file)

Function: psd-proj M
Package

matlisp

Source

misc.lisp (file)

Function: random-beta &optional SHAPE

The beta distribution has the form
p(x) dx = (Gamma(a + b)/(Gamma(a) Gamma(b))) x^(a-1) (1-x)^(b-1) dx The method used here is the one described in Knuth.

Originally from cl-randist by Leonardo Varuzza et.al. https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: random-byte-kernel ARG

Random sample from the Uniform distribution on {0, arg-1}

Package

matlisp

Source

random.lisp (file)

Function: random-chi-square &optional SHAPE

Generate random variable for chi square distribution: p(x) dx = (1/(2*Gamma(nu/2))) (x/2)^(nu/2 - 1) exp(-x/2) dx

Originally from cl-randist by Leonardo Varuzza et.al. https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: random-exponential &optional SHAPE BETA

Returns a random sample from the exponential distribution defined by,
p(x) dx = exp(- x)
using the Ziggurat method of Marsaglia and Tsang [1].

[1] Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." Journal of statistical software 5.8 (2000): 1-7.

Package

matlisp

Source

exponential.lisp (file)

Function: random-gamma &optional SHAPE B

Returns a sample from the Gamma distribution of order a>0 defined by,
p(x) dx = {1 over Gamma(a) b^a} x^{a-1} e^{-x/b} dx, x > 0,
using the method of Marsaglia and Tsang [1].

[1]. ’A Simple Method for generating gamma variables’, ACM Transactions on Mathematical Software, Vol 26, No 3 (2000), p363-372.

Originally from cl-randist by Leonardo Varuzza et.al.
https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: random-normal &optional SHAPE MEAN STD

Returns a random sample from the Normal distribution N(0, 1), defined by,
p(x) dx = {1 over sqrt{2 pi}} exp(- x^2 / 2)
using the Ziggurat method of Marsaglia and Tsang [1].

[1] Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." Journal of statistical software 5.8 (2000): 1-7.

Package

matlisp

Source

exponential.lisp (file)

Function: random-pareto &optional SHAPE

Random value for parato distribution:
p(x) dx = (a/b) / (x/b)^(a+1) dx for x >= b

Package

matlisp

Source

random.lisp (file)

Function: random-t &optional SHAPE

Generates a random variable from the t-distribution defined by,
p(x) dx = (Gamma((nu + 1)/2)/(sqrt(pi nu) Gamma(nu/2)) * (1 + (x^2)/nu)^-((nu + 1)/2) dx

Originally from cl-randist by Leonardo Varuzza et.al. https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: random-uniform &optional SHAPE ZERO-OPENP

Random sample from the Uniform distribution on [0, 1); if ZERO-OPENP then from (0, 1].

Package

matlisp

Source

random.lisp (file)

Function: range START END &optional H_ LIST-OUTPUTP &aux H
Package

matlisp

Source

misc.lisp (file)

Function: realpart TENSOR

Syntax
======
(t:realpart tensor)

Purpose
=======
Returns a new tensor object which points to the real part of TENSOR. Store is shared with TENSOR.

If TENSOR is a scalar, returns its real part.

Package

matlisp-user

Source

realimag.lisp (file)

Function: realpart~ TENSOR

Syntax
======
(t:realpart~ tensor)

Purpose
=======
Returns a new tensor object which points to the real part of TENSOR. Store is shared with TENSOR.

If TENSOR is a scalar, returns its real part.

Package

matlisp-user

Source

realimag.lisp (file)

Function: recursive-append &rest LSTS

Appends lists in a nested manner, mostly used to bring in the charm of non-lispy languages into macros.

Basically does
@lisp
(reduce
#’(lambda (x y)
(if (null x)
(if (typep (car y) ’symbol) y (car y))
(append x (if (null y) nil
(if (typep (car y) ’symbol) ‘(,y) y)))))
lsts :from-end t)
@end lisp

Examples:
@lisp
> (recursive-append
’(let ((x 1)))
’(+ x 2))
=> (LET ((X 1))
(+ X 2))

> (recursive-append
’(let ((x 1)))
’((let ((y 2))
(setq y 3))
(let ((z 2))
z)))
=> (LET ((X 1))
(LET ((Y 2))
(SETQ Y 3))
(LET ((Z 2))
Z))

> (recursive-append
nil
’((let ((x 1)) x)
(progn (+ 1 2))))
=> (LET ((X 1))
X)

> (recursive-append nil ’(let ((x 1)) x))
=> (LET ((X 1))
X)
@end lisp

Package

matlisp-utilities

Source

functions.lisp (file)

Function: remmeth FUNC SPLS &optional QUALS
Package

matlisp-utilities

Source

functions.lisp (file)

Function: remt/method NAME SPLS
Package

matlisp-template

Source

template.lisp (file)

Function: reshape~ X DIMS
Package

matlisp

Source

slice.lisp (file)

Function: root I UFD
Package

matlisp-union-find

Source

union-find.lisp (file)

Function: roots POLY &aux N
Package

matlisp

Source

poly.lisp (file)

Function: run-tests ()
Package

matlisp-tests

Source

package.lisp (file)

Function: shuffle! SEQ

Randomize the elements of a sequence. Destructive on SEQ.

Package

matlisp

Source

permutation.lisp (file)

Function: sin X
Package

matlisp-user

Source

function.lisp (file)

Function: sin! X
Package

matlisp-user

Source

function.lisp (file)

Function: sinh X
Package

matlisp-user

Source

function.lisp (file)

Function: sinh! X
Package

matlisp-user

Source

function.lisp (file)

Function: slice~ X AXIS &optional IDX PRESERVE-RANK?
Package

matlisp

Source

slice.lisp (file)

Function: slot-values OBJ SLOTS
Package

matlisp-utilities

Source

functions.lisp (file)

Function: slot-values-list OBJ SLOTS
Package

matlisp-utilities

Source

functions.lisp (file)

Function: sort-index SEQ PREDICATE &key KEY

Sorts a lisp-vector in-place, by using the function @arg{predicate} as the order. Also computes the permutation action which would sort the original sequence @arg{seq} when applied.

Package

matlisp-utilities

Source

/builds/quickref/quickref/bin/declt

Function: sort-permute SEQ PREDICATE &key KEY
Package

matlisp

Source

permutation.lisp (file)

Function: split-seq TEST SEQO &key MAX-CUTS

Split a sequence, wherever the given character occurs.

Package

matlisp-utilities

Source

string.lisp (file)

Function: splitlines STRING

Split the given string wherever the Carriage-return occurs.

Package

matlisp-utilities

Source

string.lisp (file)

Function: sqrt X
Package

matlisp-user

Source

function.lisp (file)

Function: store-type CL &optional SIZE
Package

matlisp

Source

tensor-template.lisp (file)

Function: strides X &optional IDX
Package

matlisp

Source

stride-accessor.lisp (file)

Function: string+ &rest STRINGS
Package

matlisp-utilities

Source

string.lisp (file)

Function: string-join ATOM &rest STRINGS
Package

matlisp-utilities

Source

string.lisp (file)

Function: subset I UFD
Package

matlisp-union-find

Source

union-find.lisp (file)

Function: syl A B C &optional JOB

Syntax
——
(syl A B C)
Computes the solution to the Sylvester equation:
op(A) X pm X op(B) = C
using Schur decomposition.

The variable JOB can take on any of :{n, t/c}{n, t/c}{p, n}; the first two alphabets maps to op A, op B; whilst the third one controls the sign in the equation (oh dear! which year have we landed in.).

Package

matlisp

Source

syl.lisp (file)

Function: symmetrize! ADG
Package

matlisp

Source

graph.lisp (file)

Function: tan X
Package

matlisp-user

Source

function.lisp (file)

Function: tan! X
Package

matlisp-user

Source

function.lisp (file)

Function: tanh X
Package

matlisp-user

Source

function.lisp (file)

Function: tanh! X
Package

matlisp-user

Source

function.lisp (file)

Function: tensor FIELD &optional TENSOR &aux TENSOR
Package

matlisp

Source

base-tensor.lisp (file)

Function: tensor-typep TENSOR SUBS

Syntax
======
(tensor-typep tensor subscripts)

Purpose
=======
Check if the given tensor is of a particular size in particular arguments.

Examples
========
Checking for a vector:
> (tensor-typep ten ’(class-name *))

Checking for a matrix with 2 columns:
> (tensor-typep ten ’(real-tensor (* 2)))

Package

matlisp

Source

base-tensor.lisp (file)

Function: topological-order DAG
Package

matlisp

Source

graph.lisp (file)

Function: tr MAT
Package

matlisp

Source

misc.lisp (file)

Function: (setf transpose) VALUE A &optional PERMUTATION
Package

matlisp

Source

transpose.lisp (file)

Reader

transpose (generic function)

Function: transpose! A &optional PERMUTATION

Syntax
======
(t:TRANSPOSE! a [permutation])

Purpose
=======
Exchange the arguments of the tensor in place. The default is to swap the first and last arguments of the tensor.

Settable
========
(setf (TRANSPOSE! tensor permutation) value)

is basically the same as
(copy! value (TRANSPOSE! tensor permutation)).

NOTE: This will have side-effects even if copy! doesn’t succeed.

Package

matlisp

Source

transpose.lisp (file)

Writer

(setf transpose!) (function)

Function: (setf transpose!) VALUE A &optional PERMUTATION
Package

matlisp

Source

transpose.lisp (file)

Reader

transpose! (function)

Function: transpose~ A &optional PERMUTATION

Syntax
======
(TRANSPOSE~ a permutation)

Purpose
=======
Like TRANSPOSE!, but the permuted strides and dimensions are part of a new tensor object instead, the store being shared with the given tensor.

Settable
========
(setf (TRANSPOSE~ tensor permutation) value)

is basically the same as
(copy! value (TRANSPOSE~ tensor permutation))

Package

matlisp

Source

transpose.lisp (file)

Writer

(setf transpose~) (function)

Function: (setf transpose~) VALUE A &optional PERMUTATION
Package

matlisp

Source

transpose.lisp (file)

Reader

transpose~ (function)

Function: unify I J UFD
Package

matlisp-union-find

Source

union-find.lisp (file)

Function: unzip LIST

UnZips the elements of @arg{args}.

Example:
@lisp
> (unzip ((2 A J) (3 B H) (4 C C))) => ((2 3 4) (a b c) (j h c)) @end lisp

Package

matlisp-utilities

Source

functions.lisp (file)

Function: vector-sap V &optional INC
Package

matlisp-ffi

Source

ffi.lisp (file)

Function: xlogx X
Package

matlisp-user

Source

function.lisp (file)

Function: xlogx! X
Package

matlisp-user

Source

function.lisp (file)

Function: zeros DIMS &optional TYPE INITARG

Create a tensor with dimensions @arg{dims} of class @arg{dtype}.
The optional argument @arg{initarg} is used in two completely incompatible ways.

If @arg{dtype} is a dense tensor, then @arg{initial-element}, is used to initialize all the elements. If @arg{dtype} is however, a sparse tensor, it is used for computing the number of nonzeros slots in the store.

Example:
M> (zeros 3)
#<MATLISP::|<BLAS-MIXIN DENSE-TENSOR: DOUBLE-FLOAT>| #(3)
0.000 0.000 0.000
>

M> (zeros 3 (tensor ’(complex double-float) ’simple-dense-tensor) 2) #<MATLISP::|<BLAS-MIXIN DENSE-TENSOR: (COMPLEX DOUBLE-FLOAT)>| #(3) 2.000 2.000 2.000
>

M> (zeros ’(10000 10000) (tensor ’fixnum ’simple-graph-tensor) 10000) #<MATLISP::|<GRAPH-TENSOR: FIXNUM>| #(10000 10000), size: 0/100000>

Package

matlisp

Source

maker.lisp (file)

Function: zip &rest ARGS

Zips the elements of @arg{args}.

Example:
@lisp
> (zip ’(2 3 4) ’(a b c) ’(j h c s)) => ((2 A J) (3 B H) (4 C C)) @end lisp

Package

matlisp-utilities

Source

functions.lisp (file)

Function: zipsym LST

Zips a unique gensym with each element of @arg{lst}.

Example:
@lisp
> (zipsym ’(a b c))
=> ((#:G1064 A) (#:G1065 B) (#:G1066 C))
@end lisp

Package

matlisp-utilities

Source

functions.lisp (file)

Function: ziptree TREE &rest MORE-TREES
Package

matlisp-utilities

Source

functions.lisp (file)

Function: · &rest OBJECTS
Package

matlisp-user

Source

arithmetic.lisp (file)

Function: OBJECT &rest MORE-OBJECTS &aux RET
Package

matlisp-user

Source

arithmetic.lisp (file)


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

5.1.6 Generic functions

Generic Function: axpy ALPHA X Y

Syntax
======
(AXPY alpha x y)

Purpose
=======
Computes

ALPHA * X + Y

where ALPHA is a scalar and X,Y are tensors.

The result is stored in a new matrix that has the same dimensions as Y.

X,Y must have the same dimensions.

Package

matlisp

Source

axpy.lisp (file)

Methods
Method: axpy ALPHA X (Y dense-tensor)
Generic Function: axpy! ALPHA X Y

Syntax
======
(AXPY! alpha x y)

Y <- alpha * x + y

If x is T, then

Y <- alpha + y

Purpose
=======
Same as AXPY except that the result is stored in Y and Y is returned.

Package

matlisp

Source

axpy.lisp (file)

Methods
Method: axpy! ALPHA X (Y #<group-specializer , dense-tensor, y>)
Method: axpy! ALPHA (X #<group-specializer , dense-tensor, y>) (Y #<group-specializer , dense-tensor, y>)
Method: axpy! ALPHA (X dense-tensor) (Y dense-tensor)
Method: axpy! (ALPHA number) (X base-tensor) (Y base-tensor) before
Generic Function: complexified-tensor CLASS
Package

matlisp

Source

base-tensor.lisp (file)

Methods
Method: complexified-tensor (CLASS tensor-class) around
Method: complexified-tensor (CLASS tensor-class)
Method: complexified-tensor (CLASS-NAME symbol)
Generic Function: copy! FROM TO

Syntax
======
(COPY! x y)

Purpose
=======
Copies the contents of X into Y. Returns Y.

Package

matlisp

Source

generic.lisp (file)

Methods
Method: copy! (X #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>) (Y #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>)
Source

exponential.lisp (file)

Method: copy! (TENSOR tensor) (TYPE symbol)
Source

copy.lisp (file)

Method: copy! (FROM foreign-dense-tensor) (TO (eql nil))
Source

copy.lisp (file)

Method: copy! (TENSOR dense-tensor) (TYPE symbol)
Source

copy.lisp (file)

Method: copy! X (Y #<group-specializer , coordinate-tensor, y>)
Source

copy.lisp (file)

Method: copy! X (Y #<group-specializer , dense-tensor, y>)
Source

copy.lisp (file)

Method: copy! (X #<group-specializer , tensor, x>) (Y #<group-specializer , tensor, y>)
Source

copy.lisp (file)

Method: copy! (X #<group-specializer , dense-tensor, x>) (Y array)
Source

copy.lisp (file)

Method: copy! (X array) (Y #<group-specializer , dense-tensor, y>)
Source

copy.lisp (file)

Method: copy! (X tensor) (Y tensor) before
Source

copy.lisp (file)

Method: copy! (PFLIP permutation-pivot-flip) (TYPE (eql permutation-pivot-flip))
Source

permutation.lisp (file)

Method: copy! (PFLIP permutation-pivot-flip) (TYPE (eql permutation-cycle))
Source

permutation.lisp (file)

Method: copy! (PFLIP permutation-pivot-flip) (TYPE (eql permutation-action))
Source

permutation.lisp (file)

Method: copy! (CYC permutation-cycle) (TYPE (eql permutation-cycle))
Source

permutation.lisp (file)

Method: copy! (CYC permutation-cycle) (TYPE (eql permutation-pivot-flip))
Source

permutation.lisp (file)

Method: copy! (CYC permutation-cycle) (TYPE (eql permutation-action))
Source

permutation.lisp (file)

Method: copy! (ACT permutation-action) (TYPE (eql permutation-action))
Source

permutation.lisp (file)

Method: copy! (ACT permutation-action) (TYPE (eql permutation-pivot-flip))
Source

permutation.lisp (file)

Method: copy! (ACT permutation-action) (TYPE (eql permutation-cycle))
Source

permutation.lisp (file)

Method: copy! (FROM permutation) (TO permutation)
Source

permutation.lisp (file)

Method: copy! (FROM permutation) (TO (eql nil))
Source

permutation.lisp (file)

Method: copy! (ARR array) (TYPE symbol)
Method: copy! FROM (TO array)
Method: copy! (FROM array) (TO array)
Method: copy! (X cons) (Y tensor)
Method: copy! FROM (TO cons)
Method: copy! (LST cons) (TYPE symbol)
Method: copy! (FROM cons) (TO cons)
Method: copy! (NUM number) (TYPE symbol)
Method: copy! (X array) (Y array) before
Method: copy! (X array) (Y tensor) before
Method: copy! (X tensor) (Y array) before
Method: copy! (X cons) (Y cons) before
Generic Function: div X Y

Syntax
======
(div! alpha x)

Purpose
=======
X ./ alpha

Yes the calling order is twisted.

Package

matlisp

Source

scal.lisp (file)

Methods
Method: div (ALPHA number) (X number)
Method: div ALPHA (X dense-tensor)
Method: div (ALPHA dense-tensor) X
Generic Function: div! ALPHA X

Syntax
======
(DIV! alpha x)

s Purpose
=======
X <- X ./ alpha

Yes the calling order is twisted.

Package

matlisp

Source

scal.lisp (file)

Methods
Method: div! X (Y #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>)
Source

exponential.lisp (file)

Method: div! X (Y #<group-specializer , dense-tensor, x>)
Method: div! (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, x>)
Method: div! (X dense-tensor) (Y dense-tensor)
Method: div! (X dense-tensor) (Y dense-tensor) before
Generic Function: dot X Y &optional CONJUGATE-P

Sytnax
======
(DOT x y [conjugate-p])

Purpose
=======
Computes the inner product of X,Y.

CONJUGATE-P Computed Result ——————————— H
T (default) X * Y T
NIL X * Y

If X is real then CONJUGATE-P has no
effect since for real vectors:

H T
X = X

If X and Y are both scalars then this is the same as (* (CONJUGATE X) Y) if CONJUAGTE-P and (* X Y) otherwise.

Package

matlisp

Source

dot.lisp (file)

Methods
Method: dot (X #<group-specializer , dense-tensor, x>) Y &optional CONJUGATE-P
Method: dot (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, x>) &optional CONJUGATE-P
Method: dot (X dense-tensor) (Y dense-tensor) &optional CONJUGATE-P
Method: dot (X number) (Y number) &optional CONJUGATE-P
Method: dot (X tensor) (Y tensor) &optional CONJUGATE-P before
Generic Function: element-type OBJECT
Package

matlisp-ffi

Methods
Method: element-type (CL symbol)
Source

foreign-vector.lisp (file)

Method: element-type (FOREIGN-VECTOR-CLASS foreign-vector-class)

automatically generated reader method

Source

foreign-vector.lisp (file)

Generic Function: field-type OBJECT
Package

matlisp

Methods
Method: field-type (CLASS symbol)
Source

base-tensor.lisp (file)

Method: field-type (TENSOR-CLASS tensor-class)

automatically generated reader method

Source

base-tensor.lisp (file)

Generic Function: ga= A B
Package

matlisp

Source

boolean.lisp (file)

Methods
Method: ga= (A null) (B <simple-dense-tensor:⎵boolean>)
Method: ga= (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>)
Method: ga= (A dense-tensor) (B dense-tensor)
Method: ga= A (B #<group-specializer , dense-tensor, x>)
Method: ga= (A tensor) (B tensor)
Generic Function: ge= A B
Package

matlisp

Source

boolean.lisp (file)

Methods
Method: ge= (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>)
Method: ge= (A dense-tensor) (B dense-tensor)
Method: ge= A (B #<group-specializer , dense-tensor, x>)
Method: ge= (A tensor) (B tensor)
Generic Function: geev! A &optional VL VR

Syntax
======
(GEEV! a &optional vl vr)

Purpose:
========
Computes the eigenvalues and left/right eigenvectors of A.

For an NxN matrix A, its eigenvalues are denoted by:

lambda(i), j = 1 ,..., N

The right eigenvectors of A are denoted by v(i) where:

A * v(i) = lambda(i) * v(i)

The left eigenvectors of A are denoted by u(i) where:

H H
u(i) * A = lambda(i) * u(i)

In matrix notation:
-1
A = V E V

and
-1
H H
A = U E U

where lambda(i) is the ith diagonal of the diagonal matrix E, v(i) is the ith column of V and u(i) is the ith column of U.

The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

Package

matlisp

Source

eig.lisp (file)

Methods
Method: geev! (A #<group-specializer , blas-mixin, x>) &optional VL VR
Method: geev! (A tensor) &optional VL VR before
Generic Function: gekr! ALPHA A B BETA C

Returns the kronecker product product of a and b. C <- beta * C + alpha A ⊗ B

Package

matlisp

Source

gem.lisp (file)

Methods
Method: gekr! ALPHA (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>) BETA (C #<group-specializer , dense-tensor, x>)
Method: gekr! ALPHA (A dense-tensor) (B dense-tensor) BETA (C dense-tensor)
Generic Function: gelsy A B &optional RCOND

Syntax
=======

(GELSY A B &optional TOL)

INPUT
—–
A A Matlisp matrix of size M x N
B A Matlisp matrix of size M x P
RCOND A condition number

OUTPUT
——
X A Matlisp matrix of size N x NRHS
RANK An integer

Purpose
=======

Compute the minimum-norm solution to a real linear least
squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient.

Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.

The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ]
[ 0 R22 ]
with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A.

Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization:
A * P = Q * [ T11 0 ] * Z
[ 0 0 ]
The minimum-norm solution is then
X = P * Z’ [ inv(T11)*Q1’*B ]
[ 0 ]
where Q1 consists of the first RANK columns of Q.

This routine is basically identical to the original xGELSX except three differences:
o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting.
o Matrix B (the right hand side) is updated with Blas-3.
o The permutation of matrix B (the right hand side) is faster and more simple.

Further Details
===============

Based on contributions by
A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain

=====================================================================

Package

matlisp

Source

least-squares.lisp (file)

Methods
Method: gelsy (A #<group-specializer , blas-mixin, x>) (B #<group-specializer , blas-mixin, x>) &optional RCOND
Method: gelsy (A blas-mixin) (B blas-mixin) &optional RCOND
Method: gelsy (A tensor) (B tensor) &optional RCOND before
Generic Function: gem ALPHA A B BETA C &optional JOB

Syntax
======
(GEM alpha a b beta c [job])

Purpose
=======
Performs the GEneral Matrix Multiplication given by – - -

alpha * op(A) * op(B) + beta * C

and returns the result in a new matrix.

alpha,beta are scalars and A,B,C are matrices. op(A) means either A or A’.

JOB must be a keyword with two of these alphabets N Identity
T Transpose
C Hermitian conjugate

Package

matlisp

Source

gem.lisp (file)

Methods
Method: gem ALPHA (A dense-tensor) (B dense-tensor) (BETA (eql nil)) (C (eql nil)) &optional JOB
Method: gem ALPHA (A dense-tensor) (B dense-tensor) BETA (C dense-tensor) &optional JOB
Generic Function: gem! ALPHA A B BETA C &optional JOB

Syntax
======
(GEM! alpha a b beta c [job])

Purpose
=======
Performs the GEneral Matrix/Vector Multiplication given by – - -

C <- alpha * op(A) * op(B) + beta * C

and returns C.

alpha,beta are scalars and A,B,C are matrices.
op(A) means either A or A’.

JOB must be a keyword with two of these alphabets
N Identity
T Transpose
C Hermitian transpose {conjugate transpose}

Package

matlisp

Source

gem.lisp (file)

Methods
Method: gem! ALPHA (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>) BETA (C #<group-specializer , dense-tensor, x>) &optional JOB
Method: gem! ALPHA (A dense-tensor) (B dense-tensor) BETA (C dense-tensor) &optional JOB
Method: gem! ALPHA A (B dense-tensor) BETA (C dense-tensor) &optional JOB
Method: gem! ALPHA (A tensor) (B tensor) BETA (C tensor) &optional JOB before
Generic Function: ger ALPHA X Y A &optional CONJUGATE-P

Syntax
======
(GER alpha x y A [job])

Purpose
=======
Performs the GEneral matrix Rank-1 update given by
– -

alpha * x * op(y) + A

and returns A.

alpha is a scalars,
x,y are vectors.
A is a matrix.

If conjugate-p is nil, then op(y) = y^T, else op(y) = y^H.

Package

matlisp

Source

ger.lisp (file)

Methods
Method: ger ALPHA (X dense-tensor) (Y dense-tensor) (A (eql nil)) &optional CONJUGATE-P
Method: ger ALPHA (X dense-tensor) (Y dense-tensor) (A dense-tensor) &optional CONJUGATE-P
Generic Function: ger! ALPHA X Y A &optional CONJUGATE-P

Syntax
======
(GER! alpha x y A [job])

Purpose
=======
Performs the GEneral matrix Rank-1 update given by
– -

A <- alpha * x * op(y) + A

and returns A.

alpha is a scalars,
x,y are vectors.
A is a matrix.

If conjugate-p is nil, then op(y) = y^T, else op(y) = y^H.

Package

matlisp

Source

ger.lisp (file)

Methods
Method: ger! ALPHA (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, x>) (A #<group-specializer , dense-tensor, a>) &optional CONJUGATE-P
Method: ger! ALPHA (X dense-tensor) (Y dense-tensor) (A dense-tensor) &optional CONJUGATE-P
Method: ger! ALPHA (X dense-tensor) (Y dense-tensor) (A dense-tensor) &optional CONJUGATE-P before
Generic Function: getrf! A

Syntax
======
(GETRF! a)

Purpose
=======
Given an NxM matrix A, compute its LU factorization using partial pivoting, row or column interchanges:

A = P * L * U (if A is row-major ordered)
A = L * U * P’ (if A is col-major ordered)

where:

P: permutation matrix
L: lower triangular with unit diagonal elements
(lower trapezoidal when N>M)
U: upper triangular
(upper trapezoidal when N<M)

Return Values
=============
[1] The factors L and U from the factorization A = P*L*U where the unit diagonal elements of L are not stored. (overwriting A) [2] IPIV
[3] INFO = T: successful
i: U(i,i) is exactly zero.

Package

matlisp

Source

lu.lisp (file)

Methods
Method: getrf! (A #<group-specializer , blas-mixin, x>)
Method: getrf! (A tensor) before
Generic Function: getri! A &optional PERM

Syntax
======
(GETRI! a &optional perm)

Purpose
=======
Computes the inverse of A using the LU factorization returned by GETRF!

Package

matlisp

Source

lu.lisp (file)

Methods
Method: getri! (A #<group-specializer , blas-mixin, x>) &optional IPIV
Method: getri! (A tensor) &optional IPIV before
Generic Function: getrs! A B &optional JOB IPIV

Syntax
======
(GETRS! a b [:trans :N])

Purpose
=======
Solves a system of linear equations
A * X = B or A’ * X = B
with a general N-by-N matrix A using the LU factorization computed by GETRF. A and IPIV are the results from GETRF, TRANS specifies the form of the system of equations:
= ’N’: A * X = B (No transpose)
= ’T’: A’* X = B (Transpose)
= ’C’: A’* X = B (Conjugate transpose)

Return Values
=============
[1] The NxM matrix X. (overwriting B)
[4] INFO = T: successful
i: U(i,i) is exactly zero. The LU factorization
used in the computation has been completed,
but the factor U is exactly singular.
Solution could not be computed.

Package

matlisp

Source

lu.lisp (file)

Methods
Method: getrs! (A #<group-specializer , blas-mixin, x>) (B #<group-specializer , blas-mixin, x>) &optional JOB IPIV
Method: getrs! (A blas-mixin) (B blas-mixin) &optional JOB IPIV
Method: getrs! (A tensor) (B tensor) &optional JOB IPIV before
Generic Function: gett! ALPHA A B BETA C

Returns the tensor contraction of A B: C <- beta * C + alpha A · B

Package

matlisp

Source

gem.lisp (file)

Methods
Method: gett! ALPHA (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>) BETA (C #<group-specializer , dense-tensor, x>)
Method: gett! ALPHA (A dense-tensor) (B dense-tensor) BETA (C dense-tensor)
Method: gett! ALPHA (A tensor) (B tensor) BETA (C tensor) before
Generic Function: go= A B
Package

matlisp

Source

boolean.lisp (file)

Methods
Method: go= (A null) (B <simple-dense-tensor:⎵boolean>)
Method: go= (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>)
Method: go= (A dense-tensor) (B dense-tensor)
Method: go= A (B #<group-specializer , dense-tensor, x>)
Method: go= (A tensor) (B tensor)
Generic Function: graph->adlist G &optional ENCODE-VALUESP
Package

matlisp

Source

graph.lisp (file)

Methods
Method: graph->adlist (G #<group-specializer , graph-accessor, x>) &optional ENCODE-VALUESP
Generic Function: heev! A &optional JOB UPLO?

Syntax
======
(HEEV! a &optional evec? )

Purpose:
========
Computes the eigenvalues / eigenvectors of a Hermitian (symmetric) A.

Package

matlisp

Source

eig.lisp (file)

Methods
Method: heev! (A #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>) &optional JOB UPLO?
Source

exponential.lisp (file)

Method: heev! (A #<group-specializer , blas-mixin, x>) &optional JOB UPLO?
Method: heev! (A tensor) &optional JOB UPLO? before
Generic Function: ldl! A &optional HERMITIAN? UPLO
Package

matlisp

Source

chol.lisp (file)

Methods
Method: ldl! (A #<group-specializer , blas-mixin, x>) &optional HERMITIAN? UPLO
Method: ldl! (A tensor) &optional HERMITIAN? UPLO before
Generic Function: map-tensor! FUNC X Y

Syntax
======
(MAP-TENSOR! func x y)

Purpose
=======
Applies the function element-wise on x, and sets the corresponding elements in y to the value returned by the function.

Example
=======
> (map-tensor! #’(lambda (idx x y)
(if (= (car idx) (cadr idx))
(sin x)
y))
(randn ’(2 2)) (zeros ’(2 2)))
#<REAL-TENSOR #(2 2)
-9.78972E-2 0.0000
0.0000 -.39243
>
>

Package

matlisp

Source

map.lisp (file)

Methods
Method: map-tensor! (FUNC function) (X null) (Y #<group-specializer , dense-tensor, y>)
Method: map-tensor! (FUNC function) (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, y>)
Method: map-tensor! (FUNC function) (X tensor) (Y tensor) before
Generic Function: max OBJECT &optional KEY
Package

matlisp-user

Source

norm.lisp (file)

Methods
Method: max (VEC #<group-specializer , dense-tensor, x>) &optional KEY
Generic Function: mean X &optional AXIS PRESERVE-RANK?
Package

matlisp

Source

sum.lisp (file)

Methods
Method: mean (X dense-tensor) &optional AXIS PRESERVE-RANK?
Method: mean (X number) &optional AXIS PRESERVE-RANK?
Method: mean (X sequence) &optional AXIS PRESERVE-RANK?
Generic Function: min VEC &optional KEY
Package

matlisp-user

Source

norm.lisp (file)

Methods
Method: min (VEC #<group-specializer , dense-tensor, x>) &optional KEY
Generic Function: minors X &rest INDICES

Copy minors of x corresponding to indices.

Package

matlisp

Source

slice.lisp (file)

Writer

(setf minors) (generic function)

Methods
Method: minors (X #<group-specializer , tensor, x>) &rest INDICES
Method: minors (X #<group-specializer , stride-tensor, x>) &rest INDICES
Generic Function: (setf minors) VALUE X &rest INDICES

Copy y onto the minors of x corresponding w indices.

Package

matlisp

Source

slice.lisp (file)

Reader

minors (generic function)

Methods
Method: (setf minors) Y (X #<group-specializer , stride-tensor, x>) &rest INDICES
Generic Function: norm VEC &optional N
Package

matlisp

Source

norm.lisp (file)

Methods
Method: norm (VEC #<group-specializer , dense-tensor, x>) &optional N
Generic Function: permutation CONDITION
Package

matlisp-conditions

Methods
Method: permutation (CONDITION permutation-error)
Source

conditions.lisp (file)

Generic Function: permute! THING PERMUTATION &optional ARGUMENT

(permute! thing permutation [argument 0])

Permutes the ARGUMENT index of the the array-like object THING, by applying PERMUTATION on it.

Package

matlisp

Source

permutation.lisp (file)

Methods
Method: permute! (A tensor) (PERM permutation-pivot-flip) &optional ARG
Method: permute! (SEQ cons) (PERM permutation-pivot-flip) &optional ARG
Method: permute! (SEQ vector) (PERM permutation-pivot-flip) &optional ARG
Method: permute! (A tensor) (PERM permutation-cycle) &optional ARG
Method: permute! (SEQ vector) (PERM permutation-cycle) &optional ARG
Method: permute! (SEQ cons) (PERM permutation-cycle) &optional ARG
Method: permute! (TEN tensor) (PERM permutation-action) &optional ARG
Method: permute! (SEQ vector) (PERM permutation-action) &optional ARG
Method: permute! (SEQ cons) (PERM permutation-action) &optional ARG
Method: permute! (SEQ sequence) (PERM permutation) &optional ARG before
Method: permute! (TEN tensor) (PERM permutation) &optional ARG before
Generic Function: potrf! A &optional UPLO

Syntax
======
(POTRF! a)

Purpose
=======
POTRF computes the Cholesky factorization of a real symmetric positive definite matrix A.

This is the block version of the algorithm, calling Level 3 BLAS.

Return Values
=============
[1] The factor U or L from the Cholesky
factorization A = U**T*U or A = L*L**T.
[2] INFO = T: successful
i: U(i,i) is exactly zero.

Package

matlisp

Source

chol.lisp (file)

Methods
Method: potrf! (A #<group-specializer , blas-mixin, x>) &optional UPLO
Method: potrf! (A tensor) &optional UPLO before
Generic Function: potri! A &optional UPLO

Syntax
======
(POTRI! a [:U :L])

Purpose
=======
Computes the inverse of using the pre-computed Cholesky at A.

Package

matlisp

Source

chol.lisp (file)

Methods
Method: potri! (A #<group-specializer , blas-mixin, x>) &optional UPLO
Method: potri! (A blas-mixin) &optional UPLO before
Generic Function: potrs! A B &optional UPLO

Syntax
======
(POTRS! a b [:U :L])

Purpose
=======
Solves a system of linear equations
A * X = B or A’ * X = B
with a general N-by-N matrix A using the Cholesky LU factorization computed by POTRF. A and are the results from POTRF, UPLO specifies
the form of the system of equations:
= ’U’: A = U**T*U
= ’L’: A = L*L**T

Return Values
=============
[1] The NxM matrix X. (overwriting B)
[4] INFO = T: successful
i: U(i,i) is exactly zero. The LU factorization
used in the computation has been completed,
but the factor U is exactly singular.
Solution could not be computed.

Package

matlisp

Source

chol.lisp (file)

Methods
Method: potrs! (A #<group-specializer , blas-mixin, x>) (B #<group-specializer , blas-mixin, x>) &optional UPLO
Method: potrs! (A blas-mixin) (B blas-mixin) &optional UPLO
Method: potrs! (A tensor) (B tensor) &optional UPLO before
Generic Function: prod X &optional AXIS PRESERVE-RANK?
Package

matlisp

Source

sum.lisp (file)

Methods
Method: prod (X dense-tensor) &optional AXIS PRESERVE-RANK?
Method: prod (X number) &optional AXIS PRESERVE-RANK?
Method: prod (X sequence) &optional AXIS PRESERVE-RANK?
Generic Function: prod! X Y &optional AXIS

(PROD! x y [axis 0])
__
y <- || x(:, : ..., i, :, :..)
i
where the index to be summed over is chosen using @arg{axis}.

Package

matlisp

Source

sum.lisp (file)

Methods
Method: prod! (X #<group-specializer , dense-tensor, x>) (Y (eql nil)) &optional AXIS
Method: prod! (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, y>) &optional AXIS
Method: prod! (X dense-tensor) (Y dense-tensor) &optional AXIS before
Generic Function: qr A &optional PIVOT?
Package

matlisp

Source

qr.lisp (file)

Methods
Method: qr (A #<group-specializer , blas-mixin, x>) &optional PIVOT?
Generic Function: qr! A &optional PIVOT?
Package

matlisp

Source

qr.lisp (file)

Methods
Method: qr! (A #<group-specializer , blas-mixin, x>) &optional PIVOT?
Method: qr! (A dense-tensor) &optional PIVOT? before
Generic Function: realified-tensor CLASS
Package

matlisp

Source

base-tensor.lisp (file)

Methods
Method: realified-tensor (CLASS tensor-class)
Method: realified-tensor (CLASS-NAME symbol)
Method: realified-tensor (CLASS tensor-class) around
Generic Function: ref TENSOR &rest SUBSCRIPTS

Syntax
======
(ref store subscripts)

Purpose
=======
Return the element corresponding to subscripts.

Package

matlisp

Source

tensor-template.lisp (file)

Writer

(setf ref) (generic function)

Methods
Method: ref (X #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>) &rest SUBSCRIPTS
Source

exponential.lisp (file)

Method: ref (X #<group-specializer , coordinate-tensor, x>) &rest SUBSCRIPTS
Source

coordinate-accessor.lisp (file)

Method: ref (X #<group-specializer , graph-accessor, x>) &rest SUBSCRIPTS
Source

graph-accessor.lisp (file)

Method: ref (X #<group-specializer , stride-accessor, x>) &rest SUBSCRIPTS
Source

stride-accessor.lisp (file)

Method: ref (OBJ hash-table) &rest SUBSCRIPTS
Source

generic.lisp (file)

Method: ref (OBJ hash-table) &rest SUBSCRIPTS before
Source

generic.lisp (file)

Method: ref (OBJ cons) &rest SUBSCRIPTS
Source

generic.lisp (file)

Method: ref (OBJ array) &rest SUBSCRIPTS
Source

generic.lisp (file)

Generic Function: (setf ref) VALUE TENSOR &rest SUBSCRIPTS
Package

matlisp

Source

tensor-template.lisp (file)

Reader

ref (generic function)

Methods
Method: (setf ref) VALUE (X #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>) &rest SUBSCRIPTS
Source

exponential.lisp (file)

Method: (setf ref) VALUE (X #<group-specializer , coordinate-tensor, x>) &rest SUBSCRIPTS
Source

coordinate-accessor.lisp (file)

Method: (setf ref) VALUE (X #<group-specializer , graph-accessor, x>) &rest SUBSCRIPTS
Source

graph-accessor.lisp (file)

Method: (setf ref) VALUE (X #<group-specializer , stride-accessor, x>) &rest SUBSCRIPTS
Source

stride-accessor.lisp (file)

Method: (setf ref) VALUE (OBJ hash-table) &rest SUBSCRIPTS
Source

generic.lisp (file)

Method: (setf ref) VALUE (OBJ cons) &rest SUBSCRIPTS
Source

generic.lisp (file)

Method: (setf ref) VALUE (OBJ array) &rest SUBSCRIPTS
Source

generic.lisp (file)

Generic Function: reshape! TENSOR DIMS

(RESHAPE! tensor dims)
Reshapes the @arg{tensor} to the shape in @arg{dims}.

This function expects all the strides to be of the same sign when @arg{tensor} is subtype of dense-tensor.

Package

matlisp

Source

slice.lisp (file)

Methods
Method: reshape! (TEN dense-tensor) (DIMS cons)
Method: reshape! (TENSOR dense-tensor) (DIMS cons) before
Generic Function: scal ALPHA X

Syntax
======
(SCAL alpha x)

Purpose
=======
Computes and returns a new tensor equal to

alpha .* X

where alpha is a scalar and X is a tensor.

Package

matlisp

Source

scal.lisp (file)

Methods
Method: scal (ALPHA number) (X number)
Method: scal ALPHA (X dense-tensor)
Method: scal (ALPHA dense-tensor) X
Generic Function: scal! ALPHA X

Syntax ====== (SCAL! alpha x)

Purpose =======
X <- alpha .* X

Package

matlisp

Source

scal.lisp (file)

Methods
Method: scal! X (Y #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>)
Source

exponential.lisp (file)

Method: scal! X (Y #<group-specializer , dense-tensor, x>)
Method: scal! (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, x>)
Method: scal! (X dense-tensor) (Y dense-tensor)
Method: scal! (X dense-tensor) (Y dense-tensor) before
Generic Function: scald! X M &optional AXIS
Package

matlisp

Source

scal.lisp (file)

Methods
Method: scald! (X #<group-specializer , dense-tensor, x>) (M #<group-specializer , dense-tensor, m>) &optional AXIS
Method: scald! (X dense-tensor) (M dense-tensor) &optional AXIS before
Generic Function: schur A &optional JOB

Syntax
——
(schur A &optional JOB) => λs, T &optional S

Computes the eigenvalues @arg{λs}, the upper (quasi-upper) triangular Schur form @arg{U}, and optionally an orthogonal (unitary) basis of Schur vectors @arg{S} for the real (complex) square matrix A.

Package

matlisp

Source

schur.lisp (file)

Methods
Method: schur (A #<group-specializer , blas-mixin, x>) &optional JOB
Method: schur (A tensor) &optional JOB before
Generic Function: store OBJECT
Package

matlisp

Methods
Method: store (PERMUTATION permutation)

automatically generated reader method

Source

permutation.lisp (file)

Method: store (TENSOR tensor)

Storage for the tensor.

Source

base-tensor.lisp (file)

Generic Function: store-size OBJ

@section{Syntax}
(store-size @argument{obj}) => @return{store-size}

@section{Description}
Returns the number of elements the store of the @argument{obj} can hold. This is not necessarily equal to that returned by @argument{total-size}.

Package

matlisp

Source

tensor-template.lisp (file)

Methods
Method: store-size (TENSOR #<classp-specializer , <blas-mixin simple-dense-tensor: double-float>>)
Source

exponential.lisp (file)

Method: store-size (OBJ graph-accessor)
Source

graph-accessor.lisp (file)

Method: store-size (TENSOR #<group-specializer , tensor, x>)
Generic Function: subtensor~ TENSOR SUBSCRIPTS

Syntax
======
(SUBTENSOR~ TENSOR SUBSCRIPTS &optional PRESERVE-RANK REF-SINGLE-ELEMENT?)

Purpose
=======
Creates a new tensor data structure, sharing store with
TENSOR but with different strides and dimensions, as defined
in the subscript-list SUBSCRIPTS.

Examples
========
> (defvar X (zeros ’(10 10 10)))
X

;; Get (:, 0, 0)
> (subtensor~ X ’((nil nil . nil) (0 1 . nil) (0 1 . nil)))

;; Get (:, 2:5, :)
> (subtensor~ X ’((nil nil . nil) (2 5 . nil)))

;; Get (:, :, 0:2:10) (0:10:2 = [i : 0 <= i < 10, i % 2 = 0])
> (subtensor~ X ’((nil nil . nil) (nil nil . nil) (0 10 . 2)))

Commentary
==========
Sadly in our parentheses filled world, this function has to be necessarily verbose (unlike MATLAB, Python). However, this function has been designed with the express purpose of using it with a Lisp reader macro. The slicing semantics is essentially the same as MATLAB except for the zero-based indexing.

Package

matlisp

Source

slice.lisp (file)

Writer

(setf subtensor~) (generic function)

Methods
Method: subtensor~ (TENSOR dense-tensor) (SUBSCRIPTS list)
Method: subtensor~ (TENSOR tensor) (SUBSCRIPTS list) before
Generic Function: (setf subtensor~) VALUE TENSOR SUBSCRIPTS
Package

matlisp

Source

slice.lisp (file)

Reader

subtensor~ (generic function)

Methods
Method: (setf subtensor~) VALUE (TENSOR dense-tensor) (SUBSCRIPTS list)
Method: (setf subtensor~) VALUE (TENSOR tensor) (SUBSCRIPTS list) before
Generic Function: sum X &optional AXIS PRESERVE-RANK?
Package

matlisp-user

Source

sum.lisp (file)

Methods
Method: sum (X dense-tensor) &optional AXIS PRESERVE-RANK?
Method: sum (X number) &optional AXIS PRESERVE-RANK?
Method: sum (X sequence) &optional AXIS PRESERVE-RANK?
Generic Function: sum! X Y &optional AXIS

(T:SUM! x y [axis 0] [beta 0])


y <- x(:, : ..., i, :, :..)
/_
i
where the index to be summed over is chosen using @arg{axis}.

Package

matlisp-user

Source

sum.lisp (file)

Methods
Method: sum! (X #<group-specializer , dense-tensor, x>) (Y (eql nil)) &optional AXIS
Method: sum! (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, y>) &optional AXIS
Method: sum! (X dense-tensor) (Y dense-tensor) &optional AXIS before
Generic Function: suptensor~ TENSOR ORD &optional START
Package

matlisp

Source

slice.lisp (file)

Methods
Method: suptensor~ (TEN dense-tensor) ORD &optional START
Method: suptensor~ (TENSOR base-tensor) ORD &optional START before
Generic Function: svd A &optional JOB

Syntax
======
(SVD a [job])

Purpose
=======
Computes the singular value decomposition (SVD) of the
NxM matrix A. The SVD of A is given by:

A = U * SIGMA * V’

where, taking p = min(n,m):

U = [u1 u2 ... un] an NxN othogonal matrix

[s1 0 0 ... 0]
SIGMA = [0 s2 0 ... 0] if N < M
[: : \ :]
[0 0 sp ... 0]

[s1 0 0 ... 0]
= [0 s2 0 ... 0] if M > N
[: : \ ... 0]
[: : \ 0]
[0 0 0 ... sp]
[0 0 0 ... 0]
[: : : :]
[0 0 0 ... 0]

[v1’]
V = [v2’] an MxM orthogonal matrix
[ : ]
[vm’]

The diagonal elements of SIGMA are the singular values of A.
s1,...,sp are real, non-negative and arranged so that s1 >= s2 >= ... >= sp The first p columns of U are the left singular vectors of A.
The first p rows of V’ are the right singular vectors of A.

Return Values
=============

JOB Return Value ————————————————-
:NN (default) SIGMA The p diagonal elements of SIGMA as a vector. :UN SIGMA, U
:NV SIGMA, V
:UV SIGMA, U, V

Package

matlisp

Source

svd.lisp (file)

Methods
Method: svd (A #<group-specializer , blas-mixin, x>) &optional JOB
Method: svd (A tensor) &optional JOB before
Generic Function: swap! X Y

Sytnax
======
(SWAP! x y)

Purpose
=======
Given tensors X,Y, performs:

X <-> Y

and returns Y.

X, Y must have the same dimensions.

Package

matlisp

Source

generic.lisp (file)

Methods
Method: swap! (X #<group-specializer , dense-tensor, x>) (Y #<group-specializer , dense-tensor, x>)
Source

copy.lisp (file)

Method: swap! (X dense-tensor) (Y dense-tensor)
Source

copy.lisp (file)

Method: swap! (X dense-tensor) (Y dense-tensor) before
Source

copy.lisp (file)

Generic Function: total-size OBJ
Package

matlisp

Source

tensor-template.lisp (file)

Methods
Method: total-size (OBJ fib-heap)
Source

fibonacci.lisp (file)

Method: total-size (OBJ #<group-specializer , tensor, x>)
Method: total-size (X dense-tensor)
Method: total-size (OBJ sequence)
Method: total-size (ARR array)
Generic Function: transpose A &optional PERMUTATION

Syntax
======
(TRANSPOSE~ a permutation)

Purpose
=======
Like TRANSPOSE!, but the permutation is applied on a copy of the given tensor.

Settable
========
(setf (TRANSPOSE tensor permutation) value)

is the same as (setf (transpose~ ..) ..)

Package

matlisp

Source

transpose.lisp (file)

Writer

(setf transpose) (function)

Methods
Method: transpose (G #<group-specializer , graph-accessor, x>) &optional PERMUTATION
Method: transpose (A base-accessor) &optional PERMUTATION before
Method: transpose (A dense-tensor) &optional PERMUTATION
Generic Function: tricopy! A B UPLO?

Copy upper order, lower order, or diagonal.

Package

matlisp

Source

copy.lisp (file)

Methods
Method: tricopy! A (B #<group-specializer , dense-tensor, x>) UPLO?
Method: tricopy! (A #<group-specializer , dense-tensor, x>) (B #<group-specializer , dense-tensor, x>) UPLO?
Method: tricopy! (A dense-tensor) (B dense-tensor) UPLO?
Generic Function: trs! ALPHA A B &optional SOLVE UPLO

Solve -> :{trans-> n/t/c}{Diag-> u/n}{Side-> l/r}

Package

matlisp

Source

trs.lisp (file)

Methods
Method: trs! ALPHA (A #<group-specializer , blas-mixin, x>) (B #<group-specializer , blas-mixin, x>) &optional SOLVE UPLO
Method: trs! ALPHA (A blas-mixin) (B blas-mixin) &optional SOLVE UPLO
Method: trs! ALPHA (A dense-tensor) (B dense-tensor) &optional SOLVE UPLO before
Generic Function: trsyl! A B C &optional JOB

Syntax
——
(trsyl! A B C &optional job)
Computes the solution to
op(A) X pm X op(B) = C
where A, B are (quasi) upper triangular matrices.

The variable JOB can take on any of :{n, t/c}{n, t/c}{p, n}; the first two alphabets maps to op A, op B; whilst the third one controls the sign in the equation (oh dear! which year have we landed in.).

Package

matlisp

Source

syl.lisp (file)

Methods
Method: trsyl! (A #<group-specializer , blas-mixin, x>) (B #<group-specializer , blas-mixin, x>) (C #<group-specializer , blas-mixin, x>) &optional JOB
Method: trsyl! (A blas-mixin) (B blas-mixin) (C blas-mixin) &optional JOB
Method: trsyl! (A tensor) (B tensor) (C tensor) &optional JOB before

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

5.1.7 Conditions

Condition: assumption-violated ()
Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods

print-object (method)

Condition: coercion-error ()

Cannot coerce one type into another.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
  • print-object (method)
  • to (method)
  • from (method)
Direct slots
Slot: from
Initargs

:from

Readers

from (generic function)

Slot: to
Initargs

:to

Readers

to (generic function)

Condition: dimension-mismatch ()
Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods

print-object (method)

Condition: generic-error ()
Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods
  • print-object (method)
  • message (method)
Direct slots
Slot: message
Initargs

:message

Initform

(quote "")

Readers

message (generic function)

Condition: invalid-arguments ()

Given invalid arguments to the function.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
  • print-object (method)
  • argnum (method)
Direct slots
Slot: argument-number
Initargs

:argnum

Readers

argnum (generic function)

Condition: invalid-type ()

Given an unexpected type.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
Direct slots
Slot: given-type
Initargs

:given

Readers

given (generic function)

Slot: expected-type
Initargs

:expected

Readers

expected (generic function)

Condition: invalid-value ()

Given an unexpected value.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
Direct slots
Slot: given-value
Initargs

:given

Readers

given (generic function)

Slot: expected-value
Initargs

:expected

Readers

expected (generic function)

Condition: matrix-not-pd ()

Given matrix is not positive definite.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

matrix-error (condition)

Direct methods

pos (method)

Direct slots
Slot: pos
Initargs

:position

Readers

pos (generic function)

Condition: non-uniform-bounds-error ()

Bounds are not uniform

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
Direct slots
Slot: assumed
Initargs

:assumed

Readers

assumed (generic function)

Slot: found
Initargs

:found

Readers

found (generic function)

Condition: out-of-bounds-error ()

General out-of-bounds error

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
Direct slots
Slot: requested
Initargs

:requested

Readers

requested (generic function)

Slot: bound
Initargs

:bound

Readers

bound (generic function)

Condition: parser-error ()

Macro reader encountered an error while parsing the stream.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods

print-object (method)

Condition: permutation-invalid-error ()

Object is not a permutation.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

permutation-error (condition)

Condition: permutation-permute-error ()

Cannot permute sequence.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

permutation-error (condition)

Direct methods
Direct slots
Slot: sequence-length
Initargs

:seq-len

Readers

seq-len (generic function)

Slot: permutation-size
Initargs

:per-size

Readers

per-size (generic function)

Condition: singular-matrix ()

Given matrix is singular.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

warning (condition)

Direct methods
Direct slots
Slot: tensor
Initargs

:tensor

Readers

tensor (generic function)

Slot: message
Initargs

:message

Readers

message (generic function)

Slot: pos
Initargs

:position

Readers

pos (generic function)

Condition: tensor-cannot-find-optimization ()

Cannot find optimization information for the given tensor class

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods

tensor-class (method)

Direct slots
Slot: tensor-class
Initargs

:tensor-class

Readers

tensor-class (generic function)

Condition: tensor-dimension-mismatch ()

The dimensions of the given tensors are not suitable for continuing with the operation.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Condition: tensor-error ()
Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods

tensor (method)

Direct slots
Slot: tensor
Initargs

:tensor

Readers

tensor (generic function)

Condition: tensor-index-out-of-bounds ()

An out of bounds index error

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: argument
Initargs

:argument

Readers

argument (generic function)

Slot: index
Initargs

:index

Readers

index (generic function)

Slot: argument-space-dimension
Initargs

:dimension

Readers

dimension (generic function)

Condition: tensor-index-rank-mismatch ()

Incorrect number of subscripts for the tensor.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: index-rank
Initargs

:index-rank

Readers

index-rank (generic function)

Slot: rank
Initargs

:rank

Readers

rank (generic function)

Condition: tensor-insufficient-store ()

Store is too small for the tensor with given dimensions.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: store-size
Initargs

:store-size

Readers

store-size (generic function)

Slot: max-idx
Initargs

:max-idx

Readers

max-idx (generic function)

Condition: tensor-invalid-dimension-value ()

Incorrect value for one of the dimensions of the tensor.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: argument
Initargs

:argument

Readers

argument (generic function)

Slot: argument-dimension
Initargs

:dimension

Readers

dimension (generic function)

Condition: tensor-invalid-head-value ()

Incorrect value for the head of the tensor storage.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods

head (method)

Direct slots
Slot: head
Initargs

:head

Readers

head (generic function)

Condition: tensor-invalid-stride-value ()

Incorrect value for one of the strides of the tensor storage.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: argument
Initargs

:argument

Readers

argument (generic function)

Slot: argument-stride
Initargs

:stride

Readers

stride (generic function)

Condition: tensor-method-does-not-exist ()

The method is not defined for the given tensor class.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: method-name
Initargs

:method-name

Readers

method-name (generic function)

Slot: tensor-class
Initargs

:tensor-class

Readers

tensor-class (generic function)

Condition: tensor-not-matrix ()

Given tensor is not a matrix.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods

rank (method)

Direct slots
Slot: tensor-rank
Initargs

:rank

Readers

rank (generic function)

Condition: tensor-not-vector ()

Given tensor is not a vector.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods

rank (method)

Direct slots
Slot: tensor-rank
Initargs

:rank

Readers

rank (generic function)

Condition: tensor-store-index-out-of-bounds ()

An out of bounds index error for the one-dimensional store.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Direct methods
Direct slots
Slot: index
Initargs

:index

Readers

index (generic function)

Slot: store-size
Initargs

:store-size

Readers

store-size (generic function)

Condition: tensor-store-not-consecutive ()

The strides of the store, of the given tensor are not conscutive.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Condition: tensor-type-mismatch ()

The types of the given tensors are not suitable for continuing with the operation.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

tensor-error (condition)

Condition: unknown-token ()

Given an unknown token.

Package

matlisp-conditions

Source

conditions.lisp (file)

Direct superclasses

generic-error (condition)

Direct methods
  • print-object (method)
  • token (method)
Direct slots
Slot: token
Initargs

:token

Readers

token (generic function)


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

5.1.8 Classes

Class: base-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

tensor (class)

Direct methods
Class: coordinate-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct subclasses

simple-coordinate-tensor (class)

Class: dense-tensor ()

Object which holds all values of its components.

Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses

stride-tensor (class)

Direct subclasses
Direct methods
Direct slots
Slot: parent

This slot is bound if the tensor is the view of another.

Type

(or null matlisp:tensor)

Initargs

:parent

Class: foreign-dense-tensor ()

Object which holds all values of its components, with a simple-vector store.

Package

matlisp

Source

foreign.lisp (file)

Direct superclasses
Direct methods

copy! (method)

Direct slots
Slot: parent

This slot is bound if the tensor is the view of another.

Type

(or null matlisp:tensor)

Initargs

:parent

Class: foreign-vector ()
Package

matlisp-ffi

Source

foreign-vector.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

<foreign-vector∶⎵double-float> (class)

Direct slots
Slot: ptr
Initargs

:ptr

Initform

(cffi-sys:null-pointer)

Slot: length
Initargs

:length

Initform

0

Class: graph-accessor ()

Graph store via Adjacency lists; only works for matrices.

Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses

base-accessor (class)

Direct subclasses

graph-tensor (class)

Direct methods
Direct slots
Slot: fence

Start index for neighbourhood.

Type

matlisp:index-store-vector

Initargs

:fence

Slot: neighbors

Neighbour ids.

Type

matlisp:index-store-vector

Initargs

:neighbors

Slot: transposep

Choose between row-column compressed forms.

Type

boolean

Initargs

:transposep

Class: graph-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct subclasses

simple-graph-tensor (class)

Class: hash-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct slots
Slot: stride-pivot

This slot is used to invert the hash.

Type

matlisp:index-store-vector

Initargs

:stride-pivot

Class: orthogonal-polynomial ()

P_{n} = (a_n x + b_n) P_{n - 1} - c_n P_{n - 2}; P_{-1} = 0 v_0 = (P_0, P_0)_w

Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Direct superclasses

standard-object (class)

Direct slots
Slot: an
Slot: bn
Slot: cn
Slot: p0
Initform

1

Slot: v0
Slot: vn
Class: permutation ()
Package

matlisp-conditions

Source

permutation.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: store
Initargs

:store

Readers

store (generic function)

Slot: permutation-size
Type

matlisp:index-type

Initargs

:size

Readers

permutation-size (generic function)

Class: permutation-action ()
Package

matlisp

Source

permutation.lisp (file)

Direct superclasses

permutation-index-stored (class)

Direct methods
Direct slots
Slot: store
Type

matlisp:index-store-vector

Class: permutation-cycle ()
Package

matlisp

Source

permutation.lisp (file)

Direct superclasses

permutation (class)

Direct methods
Direct slots
Slot: store
Type

list

Class: permutation-pivot-flip ()
Package

matlisp

Source

permutation.lisp (file)

Direct superclasses

permutation-index-stored (class)

Direct methods
Direct slots
Slot: store
Type

matlisp:index-store-vector

Class: simple-dense-tensor ()

Dense tensor with simple-vector store.

Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct subclasses
Class: simple-graph-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Class: stride-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct subclasses
Class: tensor ()

Object which directly holds the values of its components (or part thereof).

Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: store

Storage for the tensor.

Initargs

:store

Readers

store (generic function)

Slot: memos

Memoized attributes.

Class: tensor-class ()
Package

matlisp

Source

base-tensor.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
Direct slots
Slot: field-type
Readers

field-type (generic function)

Class: tensor-method-generator ()
Package

matlisp

Source

generator.lisp (file)

Direct superclasses

standard-generic-function (class)

Direct methods
  • compute-applicable-methods (method)
  • compute-applicable-methods-using-classes (method)
Class: union-find ()
Package

matlisp-union-find

Source

union-find.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • initialize-instance (method)
  • print-object (method)
Direct slots
Slot: setid
Initform

(matlisp-utilities:make-extensible-array)

Slot: subtree
Initform

(matlisp-utilities:make-extensible-array)

Slot: values
Initargs

:values

Initform

(matlisp-utilities:make-extensible-array)

Slot: index
Initform

(make-hash-table)


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

5.1.9 Types

Type: index-store-vector &optional SIZE
Package

matlisp

Source

base-tensor.lisp (file)

Type: index-type ()
Package

matlisp

Source

base-tensor.lisp (file)

Type: sparse-tensor ()
Package

matlisp

Source

base-tensor.lisp (file)

Type: tensor-matrix ()
Package

matlisp

Source

base-tensor.lisp (file)

Type: tensor-square-matrix ()
Package

matlisp

Source

base-tensor.lisp (file)

Type: tensor-type FIELD &key TENSOR ORDER SQUARE
Package

matlisp

Source

base-tensor.lisp (file)

Type: tensor-vector ()
Package

matlisp

Source

base-tensor.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *blank-characters*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *dbg*
Package

matlisp

Source

variables.lisp (file)

Special Variable: *exponent-tokens*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *f77-name-mangler*
Package

matlisp-ffi

Source

ffi.lisp (file)

Special Variable: *fvref-range-check*
Package

matlisp-ffi

Source

foreign-vector.lisp (file)

Special Variable: *linfix-parser*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *linfix-reader*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *operator-assoc-table*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *operator-tokens*
Package

matlisp-infix

Source

infix.lisp (file)

Special Variable: *specializer-table*
Package

matlisp

Source

generator.lisp (file)

Special Variable: *template-generated-methods*
Package

matlisp

Source

generator.lisp (file)

Special Variable: *template-table*
Package

matlisp-template

Source

template.lisp (file)

Special Variable: *tensor-contraction-functable*
Package

matlisp

Source

gem.lisp (file)

Special Variable: *tensor-print-parameters*

0: Maximum number of elements in any particular argument to print. Set this to T to print all the elements.

1: Maximum number of arguments of the tensor to print.
Set this to T to print all the arguments.

2: Determines how many spaces will be printed before each row of a matrix (default 0)

Package

matlisp

Source

print.lisp (file)

Special Variable: *tensor-symbol*
Package

matlisp-infix

Source

infix.lisp (file)


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

5.2.2 Macros

Macro: b* A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b+ A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b- A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b.* A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b./ A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b/ A &optional B

Solve x b = a (a /b); or compute /a

Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b= A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b@ A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b\ A &optional B

Solve b x = a (/b a); or compute /a

Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: b⊗ A &optional B
Package

matlisp-user

Source

arithmetic.lisp (file)

Macro: clause-for-in-dlist-2 &key (FOR VAR) (IN-DLIST V) (IN-REVERSE R?) (UNTIL END-LST)

All unique elements in the dlist.

Package

matlisp-dlist

Source

dlist.lisp (file)

Macro: clause-for-in-graph-4 &key (FOR V) (IN-GRAPH G) (FROM ROOT) (IN-ORDER ORDER) (WITH-COLOR COLOR) (WITH-PARENT P) (WITH-VISITED-ARRAY VISITED-ARRAY)
Package

matlisp

Source

dfs.lisp (file)

Macro: clause-for-in-lists-6 &key (FOR XA) (IN-LISTS X) (BY STEP-FUNCTION)
Package

matlisp

Source

map.lisp (file)

Macro: clause-for-in-vectors-5 &key (FOR XA) (IN-VECTORS X) (FROM START) (BELOW OEND) (TO CEND) (DOWNTO DEND) (WITH-INDEX INDEX)
Package

matlisp

Source

map.lisp (file)

Macro: clause-for-mod-from-below-3 &key (FOR-MOD IDX) (FROM INITIAL) (BELOW DIMENSIONS) (WITH-ITERATOR UPDATES) (LOOP-ORDER ORDER) (UPLO UL)
Package

matlisp

Source

loopy.lisp (file)

Macro: clause-for-on-dlist-1 &key (FOR CLIST) (ON-DLIST V) (IN-REVERSE R?) (UNTIL END-LST)

All unique elements on the dlist.

Package

matlisp-dlist

Source

dlist.lisp (file)

Macro: clause-for-slicing-along-7 &key (FOR XA) (SLICING X) (ALONG AXIS) (FROM START) (BELOW OEND) (TO CEND) (DOWNTO DEND) (WITH-INDEX INDEX) (BY STEP)
Package

matlisp

Source

map.lisp (file)

Macro: defcondition NAME (&rest PARENT-TYPES) (&rest SLOT-SPECS) &body OPTIONS

Like define-condition except that you can define methods inside the condition definition with: (:method {generic-function-name} {args*} &rest code*)

Package

matlisp-conditions

Source

conditions.lisp (file)

Macro: defrandom NAME ARGS &body BODY
Package

matlisp

Source

random.lisp (file)

Macro: einstein-sum-base TYPE IDX-ORDER PLACE CLAUSE &optional TESTP TIGHT-ILOOP
Package

matlisp

Source

einstein.lisp (file)

Macro: generic-incf X EXPR &optional ALPHA
Package

matlisp-infix

Source

infix.lisp (file)

Macro: generic-ref X &rest ARGS
Setf Expander: (setf generic-ref) X &rest ARGS
Package

matlisp-infix

Source

infix.lisp (file)

Macro: inlet &rest BODY
Package

matlisp-infix

Source

infix.lisp (file)

Macro: iter-hset (K S) &body BODY
Package

matlisp-hash-set

Source

hset.lisp (file)

Macro: lambda-einstein ARGS (TYPE PLACE CLAUSE &optional TESTP)
Package

matlisp

Source

einstein.lisp (file)

Macro: lift-function KERNEL &optional FN
Package

matlisp-user

Source

function.lisp (file)

Macro: make-orthogonal-polynomial &rest BODY
Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Macro: mod-update (IDX INIT DIMS &key ORDER UPLO) &rest BODY
Package

matlisp

Source

loopy.lisp (file)

Macro: offset-ref DECL &rest BODY
Package

matlisp

Source

loopy.lisp (file)

Macro: optimize-expression DECL &rest BODY
Package

matlisp

Source

optimize.lisp (file)

Macro: t/axpy! SYM A X Y
Package

matlisp

Source

axpy.lisp (file)

Macro: t/blas-axpy! SYM A X ST-X Y ST-Y
Package

matlisp

Source

axpy.lisp (file)

Macro: t/blas-copy! SYM X ST-X Y ST-Y
Package

matlisp

Source

copy.lisp (file)

Macro: t/blas-gemm! SYM ALPHA A LDA B LDB BETA C LDC TRANSA OPA OPB
Package

matlisp

Source

gem.lisp (file)

Macro: t/blas-gemv! SYM ALPHA A LDA X ST-X BETA Y ST-Y TRANSP
Package

matlisp

Source

gem.lisp (file)

Macro: t/blas-ger! SYM ALPHA X ST-X Y ST-Y A LDA &optional CONJP
Package

matlisp

Source

ger.lisp (file)

Macro: t/blas-lb SYM I
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/blas-swap! SYM X ST-X Y ST-Y
Package

matlisp

Source

copy.lisp (file)

Macro: t/blas-trsm! SYM SIDE UPLO TRANSA DIAGA ALPHA A LDA B LDB
Package

matlisp

Source

trs.lisp (file)

Macro: t/blas-trsv! SYM UPLO TRANSA DIAGA A LDA B ST-B
Package

matlisp

Source

trs.lisp (file)

Macro: t/coerce TY VAL
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/complexified-tensor SYM
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/compute-store-size SYM SIZE
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/copy! (CLX CLY) X Y
Package

matlisp

Source

copy.lisp (file)

Macro: t/dot SYM X Y &optional CONJP NUM-Y?
Package

matlisp

Source

dot.lisp (file)

Macro: t/f* TY &rest NUMS
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/f+ TY &rest NUMS
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/f- TY &rest NUMS
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/f/ TY &rest NUMS
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/f= TY &rest NUMS
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/fc TY NUM
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/fid* TY
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/fid+ TY
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/field-type SYM
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/fimagpart TY NUM
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/frealpart TY NUM
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/geev-output-fix SYM WR WI
Package

matlisp

Source

eig.lisp (file)

Macro: t/gemm! SYM ALPHA A B BETA C TRANSA TRANSB
Package

matlisp

Source

gem.lisp (file)

Macro: t/gemv! SYM ALPHA A X BETA Y TRANSP
Package

matlisp

Source

gem.lisp (file)

Macro: t/ger! SYM ALPHA X Y A &optional CONJP
Package

matlisp

Source

ger.lisp (file)

Macro: t/lapack-gees! SYM A LDA VS LDVS WR WI
Package

matlisp

Source

schur.lisp (file)

Macro: t/lapack-geev! SYM A LDA VL LDVL VR LDVR WR WI
Package

matlisp

Source

eig.lisp (file)

Macro: t/lapack-gehr! SYM A LDA TAU
Package

matlisp

Source

qr.lisp (file)

Macro: t/lapack-gelsy! SYM A LDA B LDB RCOND
Package

matlisp

Source

least-squares.lisp (file)

Macro: t/lapack-geqp! SYM A LDA JPVT TAU
Package

matlisp

Source

qr.lisp (file)

Macro: t/lapack-gesvd! SYM A LDA U LDU V LDV S
Package

matlisp

Source

svd.lisp (file)

Macro: t/lapack-getrf! SYM A LDA IPIV
Package

matlisp

Source

lu.lisp (file)

Macro: t/lapack-getri! SYM A LDA IPIV
Package

matlisp

Source

lu.lisp (file)

Macro: t/lapack-getrs! SYM A LDA B LDB IPIV TRANSP
Package

matlisp

Source

lu.lisp (file)

Macro: t/lapack-heev! SYM JOBZ UPLO A LDA W
Package

matlisp

Source

eig.lisp (file)

Macro: t/lapack-ldl! SYM A LDA UPLO IPIV &optional HET?
Package

matlisp

Source

chol.lisp (file)

Macro: t/lapack-orgqr! SYM RANK A LDA TAU
Package

matlisp

Source

qr.lisp (file)

Macro: t/lapack-ormqr! SYM SIDE TRANS RANK A LDA TAU C LDC
Package

matlisp

Source

qr.lisp (file)

Macro: t/lapack-potrf! SYM A LDA UPLO
Package

matlisp

Source

chol.lisp (file)

Macro: t/lapack-potri! SYM A LDA UPLO
Package

matlisp

Source

chol.lisp (file)

Macro: t/lapack-potrs! SYM A LDA B LDB UPLO
Package

matlisp

Source

chol.lisp (file)

Macro: t/lapack-trsyl! SYM OP.A OP.B SGN A LD.A B LD.B C LD.C
Package

matlisp

Source

syl.lisp (file)

Macro: t/realified-tensor SYM
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/scdi! SYM X Y &key SCAL? NUMX?
Package

matlisp

Source

scal.lisp (file)

Macro: t/store SYM X
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/store-allocator SYM SIZE &rest INITARGS
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/store-ref SYM STORE &rest IDX
Setf Expander: (setf t/store-ref) SYM STORE &rest IDX
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/store-set SYM VALUE STORE &rest IDX
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/store-size SYM ELE
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/store-type SYM &optional SIZE
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/strict-coerce (FROM TO) VAL
Package

matlisp

Source

numeric-template.lisp (file)

Macro: t/sum SYM X RET &optional AXIS
Package

matlisp

Source

sum.lisp (file)

Macro: t/swap! SYM X Y
Package

matlisp

Source

copy.lisp (file)

Macro: t/total-size SYM ELE
Package

matlisp

Source

tensor-template.lisp (file)

Macro: t/zeros SYM DIMS &optional INITARG
Package

matlisp

Source

maker.lisp (file)

Macro: with-colm &rest BODY
Package

matlisp

Source

blas-helpers.lisp (file)

Macro: with-columnification ((&rest INPUT) (&rest OUTPUT)) &rest BODY
Package

matlisp

Source

blas-helpers.lisp (file)

Macro: with-coordinates (&rest SYMS) VECTOR &body CODE
Package

matlisp

Source

misc.lisp (file)

Macro: with-field-element SYM DECL &rest BODY
Package

matlisp

Source

tensor-template.lisp (file)

Macro: with-field-elements SYM DECLS &rest BODY
Package

matlisp

Source

tensor-template.lisp (file)

Macro: with-foreign-objects-heaped DECLARATIONS &rest BODY

Allocate "objects" on the heap and run the "body" of code.

with-foreign-objects-heap-ed (declarations) &rest body
binding := {(var type &optional count &key (initial-contents nil))}*

Example:
> (with-foreign-objects-heaped ((x :int :count 10 :initial-element 2)) (+ (cffi:mem-aref x :int 2) 1))
3
>

Package

matlisp-ffi

Source

cffi.lisp (file)

Macro: with-foreign-objects-stacked DECLARATIONS &rest BODY

Allocate @arg{objects} on the stack and run the @arg{body} of code.

with-foreign-objects-stacked (declarations) &rest body
binding := {(var type &optional count &key (initial-contents nil))}*

Example:
>> (with-foreign-objects-stacked ((x :int :count 10 :initial-element 2)) (+ (cffi:mem-aref x :int 2) 1))
3
>>

Package

matlisp-ffi

Source

cffi.lisp (file)

Macro: with-fortran-float-modes &body BODY

Execute the body with the IEEE FP modes appropriately set for Fortran

Package

matlisp-ffi

Source

cffi.lisp (file)

Macro: with-lapack-query CLASS (WORK LWORK) &rest CODE
Package

matlisp

Source

blas-helpers.lisp (file)

Macro: with-no-init-checks &rest BODY
Package

matlisp

Source

variables.lisp (file)

Macro: with-rowm &rest BODY
Package

matlisp

Source

blas-helpers.lisp (file)

Macro: without-gcing &body BODY
Package

matlisp-ffi

Source

cffi.lisp (file)


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

5.2.3 Functions

Function: alpha-n N P

x P_n = alpha_n P_{n - 1} + beta_{n + 1} P_{n} + alpha_{n + 1} P_{n + 1}.
where P_n are orthonormal.

The recurrence relation for the orthonormal family can be obtained using the following correspondence, alpha_n = sqrt{c_{n + 1} over a_{n + 1} a_n}.
beta_n = {-b_n over a_n}.

Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Function: apply-action! SEQ PERM
Package

matlisp

Source

permutation.lisp (file)

Function: apply-cycle! SEQ PCYC
Package

matlisp

Source

permutation.lisp (file)

Function: apply-flips! SEQ PFLIP
Package

matlisp

Source

permutation.lisp (file)

Function: beta-n N P

x P_n = alpha_n P_{n - 1} + beta_{n + 1} P_{n} + alpha_{n + 1} P_{n + 1}.
where P_n are orthonormal.

The recurrence relation for the orthonormal family can be obtained using the following correspondence, alpha_n = sqrt{c_{n + 1} over a_{n + 1} a_n}.
beta_n = {-b_n over a_n}.

Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Function: blas-copyablep TEN-A TEN-B
Package

matlisp

Source

blas-helpers.lisp (file)

Function: blas-func NAME TYPE

Return the name of a given BLAS/LAPACK function whose base name is NAME operating on the type TYPE.

Package

matlisp

Source

blas-helpers.lisp (file)

Function: blas-matrix-compatiblep MATRIX &optional OP
Package

matlisp

Source

blas-helpers.lisp (file)

Function: call-fortran? X LB
Package

matlisp

Source

blas-helpers.lisp (file)

Function: cauchy-riemann-derivative F X &optional EPS
Package

matlisp

Source

ziggurat.lisp (file)

Function: cclass-max &rest LST
Package

matlisp

Source

generator.lisp (file)

Function: ccut Y FIB

cascading cut

Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: change-jobchar OP JOB
Package

matlisp

Source

blas-helpers.lisp (file)

Function: check-dims AXLST TENSORS
Package

matlisp

Source

map.lisp (file)

Function: classp-specializer CLASS-NAME
Package

matlisp

Source

generator.lisp (file)

Function: clinear-storep X
Package

matlisp

Source

tensor-template.lisp (file)

Function: cliquep G LST
Package

matlisp

Source

graph.lisp (file)

Function: coerceable? CLX CLY
Package

matlisp

Source

tensor-template.lisp (file)

Function: consecutive-storep TENSOR
Package

matlisp

Source

blas-helpers.lisp (file)

Function: coordinate-indexing IDX TENSOR
Package

matlisp

Source

coordinate-accessor.lisp (file)

Function: copy-hnode INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: cut X Y FIB

cut T_x from δ(y)

Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: dappend2 A B
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: deconsify X SYM
Package

matlisp-utilities

Source

functions.lisp (file)

Function: diagonal~ A &optional BIAS
Function: (setf diagonal~) VALUE TENSOR &optional BIAS
Package

matlisp

Source

misc.lisp (file)

Function: dict-compare FUNC-LIST A B
Package

matlisp

Source

numeric-template.lisp (file)

Function: eeuclid A B
Package

matlisp

Source

numeric-template.lisp (file)

Function: exponential-function X
Package

matlisp

Source

exponential.lisp (file)

Function: exponential-tail-sampler R0 F0 IDENTITY
Package

matlisp

Source

exponential.lisp (file)

Function: fib-order A B FIB
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: field-realp FIL
Package

matlisp

Source

numeric-template.lisp (file)

Function: find-token STR STREAM
Package

matlisp-infix

Source

infix.lisp (file)

Function: flip-major JOB
Package

matlisp

Source

blas-helpers.lisp (file)

Function: float-tensorp TYPE
Package

matlisp

Source

tensor-template.lisp (file)

Function: fortran-nop OP
Package

matlisp

Source

blas-helpers.lisp (file)

Function: fortran-nuplo OP
Package

matlisp

Source

blas-helpers.lisp (file)

Function: funcify LST
Package

matlisp-infix

Source

infix.lisp (file)

Function: gaussian-function X
Package

matlisp

Source

exponential.lisp (file)

Function: gaussian-tail-sampler R0 F0 IDENTITY
Package

matlisp

Source

exponential.lisp (file)

Function: generate-permutations LST
Package

matlisp

Source

einstein.lisp (file)

Function: getcons LST SYM
Package

matlisp

Source

einstein.lisp (file)

Function: graph-indexing! IDX TENSOR
Package

matlisp

Source

graph-accessor.lisp (file)

Function: graph-queue INIT G
Package

matlisp

Source

graph.lisp (file)

Function: group-specializer CLASS-NAME GROUP-NAME
Package

matlisp

Source

generator.lisp (file)

Function: has-sym LST SYM
Package

matlisp

Source

einstein.lisp (file)

Function: hash-table-storep X
Package

matlisp

Source

tensor-template.lisp (file)

Function: hnode-children INSTANCE
Function: (setf hnode-children) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-dcons INSTANCE
Function: (setf hnode-dcons) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-degree INSTANCE
Function: (setf hnode-degree) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-id INSTANCE
Function: (setf hnode-id) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-key INSTANCE
Function: (setf hnode-key) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-mark? INSTANCE
Function: (setf hnode-mark?) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-p OBJECT
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hnode-parent INSTANCE
Function: (setf hnode-parent) VALUE INSTANCE
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: hset-add! TABLE ELEMENT
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: hset-rem! TABLE ELEMENT
Package

matlisp-hash-set

Source

hset.lisp (file)

Function: idxn N

Syntax
======
(IDXN n)

Purpose
=======
Create an array with length @arg{n} with values 0,..,@arg{n}-1.

Package

matlisp

Source

permutation.lisp (file)

Function: ignore-characters IGNORE STREAM
Package

matlisp-infix

Source

infix.lisp (file)

Function: infix-reader STREAM SUBCHAR ARG
Package

matlisp-infix

Source

infix.lisp (file)

Function: invert-hash HASH SORT-INDEX STRIDES DIMENSIONS

uniqueness seems to make this O(n); ignoring rigour for now.

Package

matlisp

Source

stride-accessor.lisp (file)

Function: lazy-coerce X OUTPUT-TYPE-SPEC
Package

matlisp

Source

generator.lisp (file)

Function: linear-storep CL
Package

matlisp

Source

tensor-template.lisp (file)

Function: list-lexer LIST
Package

matlisp-infix

Source

infix.lisp (file)

Function: loop-generator TYPE INDEX-ORDER PLACE CLAUSE &key TESTP
Package

matlisp

Source

einstein.lisp (file)

Function: loop-generator-base TYPE INDEX-ORDER PLACE CLAUSE &key TESTP TIGHT-ILOOP
Package

matlisp

Source

einstein.lisp (file)

Function: make-foreign-dense-tensor DIMENSIONS SAP &optional TYPE &aux DIMENSIONS
Package

matlisp

Source

foreign.lisp (file)

Function: make-hnode &key (ID ID) (DEGREE DEGREE) (MARK? MARK?) (PARENT PARENT) (CHILDREN CHILDREN) (DCONS DCONS) (KEY KEY)
Package

matlisp-fibonacci

Source

fibonacci.lisp (file)

Function: make-stride DIMS
Package

matlisp

Source

stride-accessor.lisp (file)

Function: make-stride-cmj DIMS
Package

matlisp

Source

stride-accessor.lisp (file)

Function: make-stride-rmj DIMS
Package

matlisp

Source

stride-accessor.lisp (file)

Function: match-lambda-lists LSTA LSTB
Package

matlisp-template

Source

template.lisp (file)

Function: memoization-reader STREAM SUBCHAR CHAR
Package

matlisp-infix

Source

infix.lisp (file)

Function: merge-lambda-lists ARGS-1 ARGS-2
Package

matlisp

Source

random.lisp (file)

Function: method-more-specific-p METHOD1 METHOD2 REQUIRED-CLASSES
Package

matlisp

Source

generator.lisp (file)

Function: minors-check DIMS-Y STABLE
Package

matlisp

Source

slice.lisp (file)

Function: minors-strides-precompute DIMS STD INDICES
Package

matlisp

Source

slice.lisp (file)

Function: newton-solve FUNCTION X0 &key ATOL MAX-ITERATIONS STEP-SIZE
Package

matlisp

Source

ziggurat.lisp (file)

Function: norm-square N P &optional V0

(P_n, P_n)_w

Package

matlisp

Source

orthogonal-polynomial.lisp (file)

Function: op-overload EXPR &aux TABLE
Package

matlisp-infix

Source

infix.lisp (file)

Function: parse-documentation-body BODY
Package

matlisp

Source

random.lisp (file)

Function: parse-ffargs ARGS &optional APPEND-STRING-LENGTH?
Package

matlisp-ffi

Source

ffi.lisp (file)

Function: parse-loopx TYPE PLACE CLAUSE
Package

matlisp

Source

einstein.lisp (file)

Function: parse-slice SUBS DIMENSIONS
Package

matlisp

Source

slice.lisp (file)

Function: parse-slice-for-strides SUBSCRIPTS DIMENSIONS STRIDES
Package

matlisp

Source

slice.lisp (file)

Function: permutation-cycle-reader STREAM SUBCHAR ARG
Package

matlisp-infix

Source

infix.lisp (file)

Function: pflip.f->l UIDIV &optional UPLO
Package

matlisp

Source

blas-helpers.lisp (file)

Function: pflip.l->f IDIV
Package

matlisp

Source

blas-helpers.lisp (file)

Function: print-tensor TENSOR STREAM
Package

matlisp

Source

print.lisp (file)

Function: process-slice ARGS
Package

matlisp-infix

Source

infix.lisp (file)

Function: random-exponential-kernel ()
Package

matlisp

Source

/builds/quickref/quickref/bin/declt

Function: random-gamma-kernel A

Samples from the Gamma distribution of order a > 1 defined by,
p(x) dx = {1 over Gamma(a)} x^{a-1} e^{-x} dx, x > 0,
using the method of Marsaglia and Tsang [1].

[1]. ’A Simple Method for generating gamma variables’, ACM Transactions on Mathematical Software, Vol 26, No 3 (2000), p363-372.

Implemented by J.D.Lamb@btinternet.com, minor modifications for GSL by Brian Gough.

Originally from cl-randist by Leonardo Varuzza et.al.
https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: random-gnm N M &aux MAX-M

(RANDOM-GNM n m)
Samples uniformly from the set of @arg{n} vertex graphs with @arg{m} edges.

[1] Batagelj, V., & Brandes, U. (2005). Efficient generation of large random networks. Physical Review E, 71(3), 036113.

Package

matlisp

Source

erdos-renyi.lisp (file)

Function: random-gnp N P

(RANDOM-GNP n p)
Samples from a Erdos-Renyi distribution of @arg{n} vertex graphs, whose edges are sampled with probability @arg{p}.

[1] Batagelj, V., & Brandes, U. (2005). Efficient generation of large random networks. Physical Review E, 71(3), 036113.

Package

matlisp

Source

erdos-renyi.lisp (file)

Function: random-normal-kernel ()
Package

matlisp

Source

/builds/quickref/quickref/bin/declt

Function: random-t-kernel NU

The t-distribution has the form,

p(x) dx = (Gamma((nu + 1)/2)/(sqrt(pi nu) Gamma(nu/2)) * (1 + (x^2)/nu)^-((nu + 1)/2) dx

The method used here is the one described in Knuth

Originally from cl-randist by Leonardo Varuzza et.al. https://github.com/lvaruzza/cl-randist

Package

matlisp

Source

exponential.lisp (file)

Function: real-subtypep TYPE
Package

matlisp

Source

generator.lisp (file)

Function: realtype-max LST
Package

matlisp

Source

blas-helpers.lisp (file)

Function: reconsify X SYM