SparseEchelonMatrix(C, D)ΒΆ
jet.spad line 1286 [edit on github]
C: OrderedSet
D: Ring
SparseEchelonMatrix(C, D) implements sparse matrices whose columns are enumerated by the OrderedSet C and whose entries belong to the GcdDomain D. The basic operation of this domain is the computation of an row echelon form. The algorithm used tries to maintain the sparsity and is especially adapted to matrices which are already close to a row echelon form.
- *: (Matrix D, %) -> %
L*Aimplements left multiplication with a usual matrix.
- *: (Matrix Fraction D, %) -> % if D has IntegralDomain
L*Aimplements left multiplication with a usual matrix over the quotient field ofD.
- allIndices: % -> List C
allIndices(A)returns all indices used for enumerating the columns of the matrixA.
- appendRow!: (%, Record(Indices: List C, Entries: List D)) -> Void
appendRow!(A, r)appends the rowrat the end of the matrixA.
- coerce: % -> Matrix D
coerce(A)yields the matrixAin the usual matrix type.- coerce: % -> OutputForm
from CoercibleTo OutputForm
- consRow!: (%, Record(Indices: List C, Entries: List D)) -> Void
consRow!(A, r)inserts the rowrat the top of the matrixA.
- copy: % -> %
copy(A)returns a copy of the matrixA.
- elimZeroCols!: % -> Void
elimZeroCols!(A)removes columns which contain only zeros. This affects basically only the value ofallIndices(A).
- elt: (%, Integer, C) -> D
elt(A, i, c)returns the entry of the matrixAin rowiand in the column with indexc.
- extract: (%, Integer, Integer) -> %
extract(A, i1, i2)extracts the rowsi1toi2and returns them as a new matrix.
- horizJoin: (%, %) -> %
horizJoin(A, B)horizontally concats the matricesAandB. It is assumed that all indices ofBare smaller than those ofA.
- horizSplit: (%, C) -> Record(Left: %, Right: %)
horizSplit(A, c)splits the matrixAinto two at the column given byc. The first column of the right matrix is enumerated by the first index less or equal toc.
- join: (%, %) -> %
join(A, B)vertically concats the matricesAandB.
- ncols: % -> NonNegativeInteger
ncols(A)returns the number of columns of the matrixA.
- new: (List C, Integer) -> %
new(inds, nrows)generates a new matrix withnrowsrows and columns enumerated by the indicesinds. The matrix is empty, i.e. the zero matrix.
- nrows: % -> NonNegativeInteger
nrows(A)returns the number of rows of the matrixA.
- pivot: (%, Integer) -> Record(Index: C, Entry: D)
pivot(A, i)returns the leading entry of thei-th row of the matrixAtogether with its index.
- pivots: % -> Record(Indices: List C, Entries: List D)
pivots(A)returns all leading entries of the matrixAtogether with their indices.
- primitiveRowEchelon: % -> Record(Ech: %, Lt: Matrix Fraction D, Pivots: List D, Rank: NonNegativeInteger) if D has GcdDomain
primitiveRowEchelon(A)computes a row echelon form for the matrixA. The algorithm used is fraction-free elimination. Every row is made primitive by division by thegcd. The algorithm is especially adapted to matrices already close to row echelon form. The transformation matrix, the used pivots and the rank of the matrix are also returned.
- purge!: (%, C -> Boolean) -> Void
purge!(A, crit)eliminates all columns belonging to an indexcsuch thatcrit(c)yieldstrue.
- row: (%, Integer) -> Record(Indices: List C, Entries: List D)
row(A, i)returns thei-th row of the matrixA.
- rowEchelon: % -> Record(Ech: %, Lt: Matrix D, Pivots: List D, Rank: NonNegativeInteger)
primitiveRowEchelon(A)computes a row echelon form for the matrixA. The algorithm used is fraction-free elimination. It is especially adapted to matrices already close to row echelon form. The transformation matrix, the used pivots and the rank of the matrix are also returned.
- setelt!: (%, Integer, C, D) -> Void
setelt!(A, i, c, d)sets the entry of the matrixAin rowiand in the column with indexcto the valued.
- setGcdMode: Symbol -> Symbol if D has GcdDomain
setGcdMode(s)sets a new value for the flag deciding on the method used to compute gcd`s for lists. Possible values forsareiteratedandrandom.
- setRow!: (%, Integer, List C, List D) -> Void
setRow!(A, i, ind, ent)sets thei-th row of the matrixA. Its indices areind; the entriesent.
- setRow!: (%, Integer, Record(Indices: List C, Entries: List D)) -> Void
setRow!(A, i, ind, ent)sets thei-th row of the matrixAto the valuer.