org.matheclipse.core.convert
Class JASIExpr
- java.lang.Object
-
- org.matheclipse.core.convert.JASIExpr
-
- Type Parameters:
C-
public class JASIExpr extends java.lang.ObjectConvert JAS objects from and to MathEclipse objects
-
-
Constructor Summary
Constructors Constructor and Description JASIExpr(IExpr variable, RingFactory<IExpr> ringFactory)JASIExpr(java.util.List<? extends IExpr> variablesList, RingFactory<IExpr> ringFactory)JASIExpr(java.util.List<? extends IExpr> variablesList, RingFactory<IExpr> ringFactory, TermOrder termOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IExprcomplexPoly2Expr(GenPolynomial<Complex<BigRational>> poly)Convert a JAS complex polynomial toIExpr.GenPolynomial<IExpr>expr2IExprJAS(IExpr exprPoly)Convert the given expression into a JAS polynomial.IASTexprPoly2Expr(GenPolynomial<IExpr> poly, IExpr variable)Converts a JAS polynomial to a MathEclipse AST with headPlusjava.lang.Object[]factorTerms(GenPolynomial<BigRational> A)BigInteger from BigRational coefficients.GenPolynomialRing<IExpr>getPolynomialRingFactory()GenPolynomial<BigInteger>integerFromRationalCoefficients(GenPolynomial<BigRational> A)BigInteger from BigRational coefficients.IExprintegerPoly2Expr(GenPolynomial<BigInteger> poly)Convert a JAS integer polynomial toIExpr.
-
-
-
Constructor Detail
-
JASIExpr
public JASIExpr(IExpr variable, RingFactory<IExpr> ringFactory)
-
JASIExpr
public JASIExpr(java.util.List<? extends IExpr> variablesList, RingFactory<IExpr> ringFactory)
-
JASIExpr
public JASIExpr(java.util.List<? extends IExpr> variablesList, RingFactory<IExpr> ringFactory, TermOrder termOrder)
-
-
Method Detail
-
expr2IExprJAS
public GenPolynomial<IExpr> expr2IExprJAS(IExpr exprPoly) throws JASConversionException
Convert the given expression into a JAS polynomial. Only symbolic numbers are converted (i.e. noINumorIComplexNumvalues are converted into the polynomial structure)- Parameters:
exprPoly-- Returns:
- Throws:
JASConversionException
-
factorTerms
public java.lang.Object[] factorTerms(GenPolynomial<BigRational> A)
BigInteger from BigRational coefficients. Represent as polynomial with BigInteger coefficients by multiplication with the gcd of the numerators and the lcm of the denominators of the BigRational coefficients.- Parameters:
A- polynomial with BigRational coefficients to be converted.- Returns:
- Object[] with 3 entries: [0]->gcd [1]->lcm and [2]->polynomial with BigInteger coefficients.
-
getPolynomialRingFactory
public GenPolynomialRing<IExpr> getPolynomialRingFactory()
- Returns:
- the fPolyFactory
-
integerFromRationalCoefficients
public GenPolynomial<BigInteger> integerFromRationalCoefficients(GenPolynomial<BigRational> A)
BigInteger from BigRational coefficients. Represent as polynomial with BigInteger coefficients by multiplication with the lcm of the numerators of the BigRational coefficients.- Parameters:
A- polynomial with BigRational coefficients to be converted.- Returns:
- polynomial with BigInteger coefficients.
-
integerPoly2Expr
public IExpr integerPoly2Expr(GenPolynomial<BigInteger> poly) throws java.lang.ArithmeticException, java.lang.ClassCastException
Convert a JAS integer polynomial toIExpr.- Parameters:
poly-- Returns:
- Throws:
java.lang.ArithmeticExceptionjava.lang.ClassCastException
-
complexPoly2Expr
public IExpr complexPoly2Expr(GenPolynomial<Complex<BigRational>> poly) throws java.lang.ArithmeticException, java.lang.ClassCastException
Convert a JAS complex polynomial toIExpr.- Parameters:
poly-- Returns:
- Throws:
java.lang.ArithmeticExceptionjava.lang.ClassCastException
-
exprPoly2Expr
public IAST exprPoly2Expr(GenPolynomial<IExpr> poly, IExpr variable) throws java.lang.ArithmeticException, java.lang.ClassCastException
Converts a JAS polynomial to a MathEclipse AST with headPlus- Parameters:
poly- a JAS polynomialvariable-- Returns:
- Throws:
java.lang.ArithmeticExceptionjava.lang.ClassCastException
-
-
DMelt 3.0 © DataMelt by jWork.ORG