Search in sources :

Example 16 with IEvaluator

use of org.matheclipse.core.interfaces.IEvaluator in project symja_android_library by axkr.

the class GraphicsFunctions method primitivesDimension.

public static boolean primitivesDimension(IAST list, Dimensions2D dim) {
    for (int i = 1; i < list.size(); i++) {
        if (list.get(i).isAST()) {
            IAST primitive = (IAST) list.get(i);
            if (primitive.head().isBuiltInSymbol()) {
                IBuiltInSymbol symbol = (IBuiltInSymbol) primitive.head();
                IEvaluator evaluator = symbol.getEvaluator();
                if (evaluator instanceof IGraphics3D) {
                    if (!((IGraphics3D) evaluator).graphics2DDimension(primitive, dim)) {
                    // return false;
                    }
                }
            }
        }
    }
    return true;
}
Also used : IBuiltInSymbol(org.matheclipse.core.interfaces.IBuiltInSymbol) IEvaluator(org.matheclipse.core.interfaces.IEvaluator) IAST(org.matheclipse.core.interfaces.IAST) IGraphics3D(org.matheclipse.core.graphics.IGraphics3D)

Aggregations

IEvaluator (org.matheclipse.core.interfaces.IEvaluator)16 IBuiltInSymbol (org.matheclipse.core.interfaces.IBuiltInSymbol)15 IExpr (org.matheclipse.core.interfaces.IExpr)12 IAST (org.matheclipse.core.interfaces.IAST)10 ISymbol (org.matheclipse.core.interfaces.ISymbol)6 EvalEngine (org.matheclipse.core.eval.EvalEngine)4 IFunctionEvaluator (org.matheclipse.core.eval.interfaces.IFunctionEvaluator)3 IGraphics3D (org.matheclipse.core.graphics.IGraphics3D)3 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 ArrayList (java.util.ArrayList)2 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)2 ExprEvaluator (org.matheclipse.core.eval.ExprEvaluator)2 ComplexNum (org.matheclipse.core.expression.ComplexNum)2 Num (org.matheclipse.core.expression.Num)2 ByteArrayExpr (org.matheclipse.core.expression.data.ByteArrayExpr)2 IDistribution (org.matheclipse.core.interfaces.IDistribution)2 RomanArabicConverter (com.baeldung.algorithms.romannumerals.RomanArabicConverter)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 Suppliers (com.google.common.base.Suppliers)1