8.1.2.3 FreeModuleElement_generic_sparse Objects

class FreeModuleElement_generic_sparse
A generic_sparse is a dictionary with keys ints i and entries in the base ring.
FreeModuleElement_generic_sparse( parent, [entries=True], [coerce_entries=True], [copy=0])

Instances of class FreeModuleElement_generic_sparse have the following methods (in addition to inherited methods and special methods):

denominator,$  $ dict,$  $ entries,$  $ get,$  $ nonzero_positions,$  $ set

Further documentation:

get( i)

Like __getitem__ but with no type or bounds checking. Returns 0 if access is out of bounds.

nonzero_positions( )

Returns the set of pairs (i,j) such that self[i,j] != 0.

set( i, x)

Like __setitem__ but with no type or bounds checking.

Instances of class FreeModuleElement_generic_sparse also have the following special methods:

__getitem__,$  $ __setitem__

Further documentation:

__setitem__( i, value)

See About this document... for information on suggesting changes.