Home | Trees | Index | Help |
|
---|
Package sage :: Package linalg :: Module vector_space :: Class VectorSpace_generic |
|
Gens
--+ |object
--+ | | |VectorSpace
--+ | VectorSpace_generic
VectorSpace_ambient
,
VectorSpace_subspace
Method Summary | |
---|---|
Create the space of all vectors of given degree over base_field. | |
__add__(self,
other)
| |
__call__(self,
entries,
coerce_entries,
copy,
check_element)
| |
__cmp__(self,
right)
| |
__contains__(self,
x)
| |
__repr__(self)
| |
ambient_space(self)
| |
base_field(self)
| |
base_ring(self)
| |
basis(self)
| |
Write v in terms of the basis for self. | |
degree(self)
| |
dimension(self)
| |
echelonized_basis(self)
| |
gen(self,
n)
| |
is_ambient(self)
| |
is_dense(self)
| |
is_full(self)
| |
is_sparse(self)
| |
matrix(self)
| |
ngens(self)
| |
Returns a random element of self. | |
Returns a random element of self. | |
Create a subspace of self. | |
Create a subspace of self with given basis. | |
vector(self,
x,
coerce_entries,
copy,
check_element)
| |
vector_space(self,
degree)
| |
zero_vector(self)
| |
Inherited from VectorSpace | |
(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) | |
Inherited from Gens | |
| |
| |
| |
| |
|
Instance Method Details |
---|
__init__(self,
base_field,
degree,
sparse=False)
|
coordinates(self, v)Write v in terms of the basis for self. Returns a list c such that if B is the basis for self, then sum c[i] B[i] = v If v is not in self, raises an ArithmeticError exception. |
random(self, X=[-2, -1, 1, 2], prob=1.0, coerce=True)Returns a random element of self. |
random_element(self, X=[-2, -1, 1, 2], prob=1.0, coerce=True)Returns a random element of self. |
subspace(self, gens)Create a subspace of self. INPUT: gens -- a list of vector in self OUTPUT: VectorSpace -- the subspace spanned by the vectors in the list gens. The basis for the subspace is always put in reduced row echelon form. EXAMPLES: >>> import sage.rings.rings as rings >>> V = VectorSpace(rings.RationalField(), 3) >>> B = V.basis() >>> W = V.subspace([B[0]+B[1], 2*B[1]-B[2]]) >>> W Vector space of degree 3, dimension 2 over Rational Field Basis matrix: [ 1 0 1/2] [ 0 1 -1/2] |
subspace_with_basis(self, basis)Create a subspace of self with given basis. INPUT: basis -- a list of linearly independent vectors OUTPUT: VectorSpace_subspace_with_basis -- the subspace with given basis. The basis for the subspace is always put in reduced row echelon form. EXAMPLES: >>> import sage.rings.rings as rings >>> V = VectorSpace(rings.RationalField(), 3) >>> B = V.basis() >>> W = V.subspace_with_basis([B[0]+B[1], 2*B[1]-B[2]]) >>> W Vector space of degree 3, dimension 2 over Rational Field User basis matrix: [ 1 1 0] [ 0 2 -1] |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon May 9 17:57:02 2005 | http://epydoc.sf.net |