5.2.1.3 Vector_generic_sparse Objects

class Vector_generic_sparse
A generic sparse vector is a dictionary with keys ints i and entries in the base ring. WARNING: In creation, we do not check that the i pairs satisfy 0 <= i < degree
Vector_generic_sparse( parent, [entries=True], [coerce_entries=True], [copy=0])

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

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

These methods are defined as follows:

denominator( )

dict( )

entries( )

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 Vector_generic_sparse also have the following special methods:

__getitem__( i)

__setitem__( i, value)

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