Module jas :: Class RingElem
[hide private]
[frames] | no frames]

Class RingElem

source code

Proxy for JAS ring elements.

Methods to be used as + - * ** / %.

Instance Methods [hide private]
 
__init__(self, elem)
Constructor for ring element.
source code
 
__str__(self)
Create a string representation.
source code
 
zero(self)
Zero element of this ring.
source code
 
isZERO(self)
Test if this is the zero element of the ring.
source code
 
one(self)
One element of this ring.
source code
 
isONE(self)
Test if this is the one element of the ring.
source code
 
signum(self)
Get the sign of this element.
source code
 
__abs__(self)
Absolute value.
source code
 
__neg__(self)
Negative value.
source code
 
__pos__(self)
Positive value.
source code
 
coerce(self, other)
Coerce other to self.
source code
 
isFactory(self)
Test if this is itself a ring factory.
source code
 
isPolynomial(self)
Test if this is a polynomial.
source code
 
__cmp__(self, other)
Compare two ring elements.
source code
 
__hash__(self)
Hash value.
source code
 
__len__(self)
Length of the element.
source code
 
__mul__(self, other)
Multiply two ring elements.
source code
 
__rmul__(self, other)
Reverse multiply two ring elements.
source code
 
__add__(self, other)
Add two ring elements.
source code
 
__radd__(self, other)
Reverse add two ring elements.
source code
 
__sub__(self, other)
Subtract two ring elements.
source code
 
__rsub__(self, other)
Reverse subtract two ring elements.
source code
 
__div__(self, other)
Divide two ring elements.
source code
 
__rdiv__(self, other)
Reverse divide two ring elements.
source code
 
__mod__(self, other)
Modular remainder of two ring elements.
source code
 
__xor__(self, other)
Can not be used as power.
source code
 
__pow__(self, other, n=None)
Power of this to other.
source code
 
__eq__(self, other)
Test if two ring elements are equal.
source code
 
__ne__(self, other)
Test if two ring elements are not equal.
source code
 
__float__(self)
Convert to Python float.
source code
 
factory(self)
Get the factory of this element.
source code
 
gens(self)
Get the generators for the factory of this element.
source code
 
inject_variables(self)
Inject generators as variables into the main global namespace
source code
 
monic(self)
Monic polynomial.
source code
 
homogenize(self, var='h')
homogenize polynomial.
source code
 
evaluate(self, a)
Evaluate at a for power series or polynomial.
source code
 
integrate(self, a=0, r=None)
Integrate a power series or rational function with constant a.
source code
 
differentiate(self, r=None)
Differentiate a power series.
source code
 
random(self, n=3)
Random element.
source code
 
gcd(self, b)
Compute the greatest common divisor of this/self and b.
source code
 
squarefreeFactors(self)
Compute squarefree factors of polynomial.
source code
 
factors(self)
Compute irreducible factorization for modular, integer, rational number and algebriac number coefficients.
source code
 
factorsAbsolute(self)
Compute absolute irreducible factorization for (modular,) rational number coefficients.
source code
 
realRoots(self, eps=None)
Compute real roots of univariate polynomial.
source code
 
complexRoots(self, eps=None)
Compute complex roots of univariate polynomial.
source code
 
algebraicRoots(self, eps=None)
Compute algebraic roots, i.e.
source code
 
rootRefine(self, eps=None)
Compute algebraic roots refinement.
source code
 
decimalRoots(self, eps=None)
Compute decimal approximation of real and complex roots of univariate polynomial.
source code
 
rootsOfUnity(self)
Roots of unity of real and complex algebraic numbers.
source code
 
rootReduce(self, other)
Root reduce of real and complex algebraic numbers.
source code
 
coefficients(self)
Get the coefficients of a polynomial.
source code
 
parent(self)
Parent in Sage is factory in JAS.
source code
 
__call__(self, num)
Apply this to num.
source code
 
lm(self)
Leading monomial of a polynomial.
source code
 
lc(self)
Leading coefficient of a polynomial.
source code
 
lt(self)
Leading term of a polynomial.
source code
 
degree(self)
Degree of a polynomial.
source code
 
base_ring(self)
Coefficient ring of a polynomial.
source code
 
is_field(self)
Test if this RingElem is field.
source code
 
monomials(self)
All monomials of a polynomial.
source code
 
divides(self, other)
Test if self divides other.
source code
 
ideal(self, list)
Create an ideal.
source code
 
monomial_quotient(self, a, b, coeff=False)
Quotient of ExpVectors.
source code
 
monomial_divides(self, a, b)
Test divide of ExpVectors.
source code
 
monomial_pairwise_prime(self, e, f)
Test if ExpVectors are pairwise prime.
source code
 
monomial_lcm(self, e, f)
Lcm of ExpVectors.
source code
 
reduce(self, F)
Compute a normal form of self with respect to F.
source code
Method Details [hide private]

homogenize(self, var='h')

source code 

homogenize polynomial.

INPUT:

  • "var" - variable name to use for homogenization

integrate(self, a=0, r=None)

source code 

Integrate a power series or rational function with constant a.

a is the integration constant, r is for partial integration in variable r.

differentiate(self, r=None)

source code 

Differentiate a power series.

r is for partial differentiation in variable r.

random(self, n=3)

source code 

Random element.

n size for random element will be less than 2**n.

algebraicRoots(self, eps=None)

source code 

Compute algebraic roots, i.e. the real and complex roots of univariate polynomial.

rootReduce(self, other)

source code 

Root reduce of real and complex algebraic numbers. Compute an extension field with a primitive element.

parent(self)

source code 

Parent in Sage is factory in JAS.

Compatibility method for Sage/Singular.

lm(self)

source code 

Leading monomial of a polynomial.

Compatibility method for Sage/Singular. Note: the meaning of lt and lm is swapped compared to JAS.

lc(self)

source code 

Leading coefficient of a polynomial.

Compatibility method for Sage/Singular.

lt(self)

source code 

Leading term of a polynomial.

Compatibility method for Sage/Singular. Note: the meaning of lt and lm is swapped compared to JAS.

monomials(self)

source code 

All monomials of a polynomial.

Compatibility method for Sage/Singular.

divides(self, other)

source code 

Test if self divides other.

Compatibility method for Sage/Singular.

ideal(self, list)

source code 

Create an ideal.

Compatibility method for Sage/Singular.

monomial_quotient(self, a, b, coeff=False)

source code 

Quotient of ExpVectors.

Compatibility method for Sage/Singular.

monomial_divides(self, a, b)

source code 

Test divide of ExpVectors.

Compatibility method for Sage/Singular.

monomial_pairwise_prime(self, e, f)

source code 

Test if ExpVectors are pairwise prime.

Compatibility method for Sage/Singular.

monomial_lcm(self, e, f)

source code 

Lcm of ExpVectors.

Compatibility method for Sage/Singular.

reduce(self, F)

source code 

Compute a normal form of self with respect to F.

Compatibility method for Sage/Singular.