Esempio n. 1
0
 @Override
 public IExpr evaluate(final IAST functionList) {
   if (functionList.size() != 2) {
     throw new WrongNumberOfArguments(functionList, 1, functionList.size() - 1);
   }
   return F.bool(functionList.get(1).isVector() != (-1));
 }
Esempio n. 2
0
 /**
  * Returns <code>True</code> if the given expression is a polynoomial object; <code>False</code>
  * otherwise
  */
 @Override
 public IExpr evaluate(final IAST ast) {
   if (ast.size() != 3) {
     throw new WrongNumberOfArguments(ast, 2, ast.size() - 1);
   }
   IAST list;
   if (ast.get(2).isList()) {
     list = (IAST) ast.get(2);
   } else {
     list = List(ast.get(2));
   }
   return F.bool(polynomialQ(ast.get(1), list));
 }