OpenMath Content Dictionary: linalgspars1

Canonical URL:
http://www.openmath.org/cd/linalgspars1.ocd
CD File:
linalgspars1.ocd
CD as XML Encoded OpenMath:
linalgspars1.omcd
Defines:
nonZeroRowSparseMatrix, nonZeroRowSparseMatrix01, sparseMatrix, sparseMatrix01, sparseMatrixElement1, sparseMatrixElement2, sparseMatrixElement3, sparseMatrixElement4, sparseMatrixRow
Date:
2002-11-15
Version:
0 (Revision 1)
Review Date:
2005-01-01
Status:
experimental

Symbols for describing sparse matrices.

November 2004, Arjeh M. Cohen: The former name of this CD, when contributed, was linalg6, but this led to a name clash. Hence the renaming.


sparseMatrixElement1

Description:

This symbol may be used to represent a non-zero element of a sparse matrix in the following way. It takes three arguments, the first of which represents the column index, the second of which represents the row index and the third represents the value. The indexing is one based; that is an element in the top left position of the matrix will have first and second indices of 1,1 respectively. Applications of this symbol will be expected as arguments of the symbol sparseMatrix in this content dictionary.

Signatures:
sts


[Next: sparseMatrixElement2] [Last: nonZeroRowSparseMatrix01] [Top]

sparseMatrixElement2

Description:

This symbol may be used to represent a non-zero element of a sparse matrix in the following way. It takes two arguments, the first of which represents the column index, the second of which represents the value of the element. The row index is deduced from the index of the sparseMatrixRow symbols of which applications of this symbol are arguments. Applications of this symbol occur as arguments of arguments of the symbol nonZeroRowSparseMatrix only.

Signatures:
sts


[Next: sparseMatrixElement3] [Previous: sparseMatrixElement1] [Top]

sparseMatrixElement3

Description:

This symbol may be used to represent a non-zero element of a sparse matrix over Z_2 in the following way. The first and second arguments are the column and row indices of the non-zero elements respectively i.e. elements with value 1. Applications of this symbol occur as arguments of arguments of the symbol sparseMatrix01 only.

Signatures:
sts


[Next: sparseMatrixElement4] [Previous: sparseMatrixElement2] [Top]

sparseMatrixElement4

Description:

This symbol may be used to represent a non-zero element of a sparse matrix over Z_2 in the following way. The single argument is the column index of non-zero elements of the matrix, i.e. elements with value 1. Applications of this symbol occur as arguments of arguments of the symbol nonZeroRowSparseMatrix01 only.

Signatures:
sts


[Next: sparseMatrixRow] [Previous: sparseMatrixElement3] [Top]

sparseMatrixRow

Description:

This symbol may be used to represent rows of sparse matrices, it is a fairly general symbol in that it may be used to represent rows of any type of sparse matrix from this CD. However the particular type of sparse matrix must have as elements symbols of the corresponding type, as described in that symbols description.

Signatures:
sts


[Next: sparseMatrix] [Previous: sparseMatrixElement4] [Top]

sparseMatrix

Description:

This symbol may be used for representing matrices, it is designed for efficiently representing sparse matrices. The symbol is n+2 ary, where the first argument is the number of rows in the matrix, the second argument is the number of columns in the matrix and n is the number of non-zero entries. The following arguments must be applications of the symbol sparseMatrixElement1.

Any non-specified entry is implicitly zero.

Example:
The matrix $$ \left ( \begin{array}{ccccc} 5&0&0&0&0\\ 0&0&6&0&0\\ 0&0&0&0&0\\ 0&0&0&0&1 \end{array}\right ) $$ may be represented as:
sparseMatrix ( 4 , 5 , sparseMatrixElement1 ( 1 , 1 , 5 ) , sparseMatrixElement1 ( 2 , 3 , 6 ) , sparseMatrixElement1 ( 4 , 5 , 1 ) )
Signatures:
sts


[Next: nonZeroRowSparseMatrix] [Previous: sparseMatrixRow] [Top]

nonZeroRowSparseMatrix

Description:

This symbol may be used for representing matrices, it is designed for efficiently representing sparse matrices where every row has at least one non-zero entry. This is an n+1 ary symbol, where n is the number of rows in the matrix. The first argument must be the number of columns in the matrix, every following argument of the symbol must be an application of a sparseMatrixRow symbol which has arguments which are sparseMatrixElement2, one sparseMatrixElement2 element for each row in the matrix, in the order in which they occur in the matrix.

Any non-specified entry is implicitly zero.

Example:
The matrix $$ \left ( \begin{array}{ccccc} 5&0&0&0&0\\ 0&0&2&0&0\\ 1&0&0&0&0\\ 0&0&0&0&1 \end{array}\right ) $$ may be represented as:
nonZeroRowSparseMatrix ( 5 , sparseMatrixRow ( sparseMatrixElement2 ( 1 , 5 ) ) , sparseMatrixRow ( sparseMatrixElement2 ( 3 , 2 ) ) , sparseMatrixRow ( sparseMatrixElement2 ( 1 , 1 ) ) , sparseMatrixRow ( sparseMatrixElement2 ( 5 , 1 ) ) )
Signatures:
sts


[Next: sparseMatrix01] [Previous: sparseMatrix] [Top]

sparseMatrix01

Description:

This symbol may be used for representing matrices which have all entries in the modular field Z_2, i.e. 1 or 0. It allows efficient representation of sparse matrices, more so than the 'sparseMatrix' symbol, since the value of the entries with values of 1 need not be stored, only their positions.

The symbol is n+2 ary, where the first argument is the number of rows in the matrix, the second argument is the number of columns in the matrix. The following arguments are sparseMatrixElement3 elements described in this content dictionary.

Any non-specified entry is implicitly zero.

Example:
The matrix $$ \left ( \begin{array}{ccccc} 1&0&0&0&0\\ 0&0&1&0&0\\ 0&0&0&0&0\\ 0&0&0&0&1 \end{array}\right ) $$ may be represented as:
sparseMatrix01 ( 4 , 5 , sparseMatrixElement3 ( 1 , 1 ) , sparseMatrixElement3 ( 2 , 3 ) , sparseMatrixElement3 ( 4 , 5 ) )
Signatures:
sts


[Next: nonZeroRowSparseMatrix01] [Previous: nonZeroRowSparseMatrix] [Top]

nonZeroRowSparseMatrix01

Description:

This symbol may be used to represent matrices which have no zero rows, and for which every row is in Z_2 efficiently. The first argument is the number of columns in the matrix, the following arguments are sparseMatrixRow elements where the arguments are sparseMatrixElement4 elements.

Any non-specified entry is implicitly zero.

Example:
The matrix $$ \left ( \begin{array}{ccccc} 1&0&0&0&1\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&1 \end{array}\right ) $$ may be represented as:
nonZeroRowSparseMatrix01 ( 5 , sparseMatrixRow ( sparseMatrixElement4 ( 1 ) , sparseMatrixElement4 ( 5 ) ) , sparseMatrixRow ( sparseMatrixElement4 ( 3 ) ) , sparseMatrixRow ( sparseMatrixElement4 ( 4 ) ) , sparseMatrixRow ( sparseMatrixElement4 ( 5 ) ) )
Signatures:
sts


[First: sparseMatrixElement1] [Previous: sparseMatrix01] [Top]