Home | Trees | Index | Help |
|
---|
Package sage :: Package linalg :: Module sparse_matrix :: Class Sparse_matrix_generic |
|
object
--+ |SparseMatrix
--+ | Sparse_matrix_generic
Sparse_matrix_rational
Method Summary | |
---|---|
__init__(self,
base_ring,
nrows,
ncols,
entries,
coerce,
sort,
copy)
| |
__add__(self,
other)
| |
__getitem__(self,
i)
| |
__getslice__(self,
i,
j)
| |
__neg__(self)
| |
__repr__(self)
| |
__rmul__(self,
left)
| |
__sub__(self,
right)
| |
base_ring(self)
| |
copy(self)
| |
todo | |
dict(self)
| |
Returns the echelon form of this matrix. | |
entries(self)
| |
list(self)
| |
Returns the sparse submatrix of self composed of the given list of columns. | |
The sparse matrix got by deleted all pivot columns. | |
Returns the sparse submatrix of self composed of the given list of rows. | |
ncols(self)
| |
nonpivots(self)
| |
nrows(self)
| |
pivots(self)
| |
randomize(self,
sparcity,
exact)
| |
Return the ith row of this matrix as a sparse vector. | |
Return a list of the sparse rows of this matrix. | |
scalar_multiple(self,
left)
| |
entries is a list of triples (i,j,x) and the x must be nonzero. | |
Returns the transpose of self. | |
Inherited from SparseMatrix | |
(Static method) | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Method Details |
---|
dense_matrix(self)todo |
echelon_form(self, params=None)Returns the echelon form of this matrix. INPUT: params -- ignored. |
matrix_from_columns(self, columns)Returns the sparse submatrix of self composed of the given list of columns. INPUT: columns -- list of int's OUTPUT: a sparse matrix. |
matrix_from_nonpivot_columns(self)The sparse matrix got by deleted all pivot columns. |
matrix_from_rows(self, rows)Returns the sparse submatrix of self composed of the given list of rows. INPUT: rows -- list of int's OUTPUT: a sparse matrix. |
row(self, i)Return the ith row of this matrix as a sparse vector. WARNING: Sparse matrices are stored as a single list of triples (i,j,x), so extracting the i-th row is expensive. This command builds a redundant representation of the matrix as a list of sparse vectors, thus doubling the memory requirement. |
rows(self)Return a list of the sparse rows of this matrix. The ith element of this list is the i-th row of this matrix. |
set_entries(self, entries, coerce=True, sort=True, copy=True)entries is a list of triples (i,j,x) and the x must be nonzero. This function does *not* check that i and j are in bounds or that the x are all nonzero. |
transpose(self)Returns the transpose of self. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri May 20 19:41:04 2005 | http://epydoc.sf.net |