use of edu.jas.poly.TermOrder in project symja_android_library by axkr.
the class GroebnerBasis method evaluate.
@Override
public IExpr evaluate(final IAST ast, EvalEngine engine) {
if (ast.size() >= 3) {
if (ast.arg1().isVector() < 0 || ast.arg2().isVector() < 0) {
return F.NIL;
}
TermOrder termOrder = TermOrderByName.Lexicographic;
if (ast.size() > 3) {
final Options options = new Options(ast.topHead(), ast, ast.size() - 1, engine);
termOrder = options.getMonomialOrder(ast, termOrder);
}
IAST polys = (IAST) ast.arg1();
IAST vars = (IAST) ast.arg2();
if (vars.size() <= 1) {
return F.NIL;
}
return computeGroebnerBasis(polys, vars, termOrder);
}
return F.NIL;
}
Aggregations