Package sage :: Package linalg :: Module vector :: Class Vector_generic_sparse
[show private | hide private]
[frames | no frames]

Class Vector_generic_sparse

Vector --+
         |
        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

Method Summary
  __init__(self, parent, entries, coerce_entries, copy)
  __getitem__(self, i)
  __setitem__(self, i, value)
  denominator(self)
  dict(self)
  entries(self)
  get(self, i)
Like __getitem__ but with no type or bounds checking.
  nonzero_positions(self)
Returns the set of pairs (i,j) such that self[i,j] != 0.
  set(self, i, x)
Like __setitem__ but with no type or bounds checking.
    Inherited from Vector
  __abs__(self)
  __add__(self, right)
  __cmp__(self, right)
  __invert__(self)
  __mod__(self, p)
  __mul__(self, right)
  __neg__(self)
  __pos__(self)
  __pow__(self, n)
  __repr__(self)
  __rmul__(self, left)
  __str__(self)
  __sub__(self, right)
  base_field(self)
  base_ring(self)
  copy(self)
  degree(self)
  height(self)
  is_dense(self)
  is_sparse(self)
  is_vector(self)
  list(self)
  parent(self)
  rational_reconstruction(self)
  str_latex(self)
Print a latex representation of self.

Method Details

get(self, i)

Like __getitem__ but with no type or bounds checking. Returns 0 if access is out of bounds.
Overrides:
sage.linalg.vector.Vector.get

nonzero_positions(self)

Returns the set of pairs (i,j) such that self[i,j] != 0.
Overrides:
sage.linalg.vector.Vector.nonzero_positions

set(self, i, x)

Like __setitem__ but with no type or bounds checking.
Overrides:
sage.linalg.vector.Vector.set

Generated by Epydoc 2.1 on Fri May 20 19:41:04 2005 http://epydoc.sf.net