Codota Logo
ASTNodeFactory
Code IndexAdd Codota to your IDE (free)

How to use
ASTNodeFactory
in
org.matheclipse.parser.client.operator

Best Java code snippets using org.matheclipse.parser.client.operator.ASTNodeFactory (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.appdapter/ext.bundle.math.symja_jas

public LessEqual() {
  // ≤ ࣘ
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("LessEqual").getPrecedence(),
      "\\leq ");
}
origin: axkr/symja_android_library

@Override
public SymbolNode createSymbol(final String symbolName) {
  return createSymbol(symbolName, "");
}
origin: axkr/symja_android_library

@Override
public SymbolNode createSymbol(final String symbolName, final String context) {
  String name = symbolName;
  if (fIgnoreCase) {
    name = symbolName.toLowerCase();
  }
  if (Config.RUBI_CONVERT_SYMBOLS) {
    name = toRubiString(name);
  }
  // if (fIgnoreCase) {
  // return new SymbolNode(symbolName.toLowerCase());
  // }
  return new SymbolNode(name);
}
origin: org.appdapter/ext.bundle.math.symja_jas

      grouping = InfixOperator.RIGHT_ASSOCIATIVE;
    oper = ASTNodeFactory.createInfixOperator(operatorStr, headStr, precedence, grouping);
  } catch (final NoSuchElementException nsee) {
    oper = new InfixOperator(operatorStr, headStr, precedence, InfixOperator.NONE);
  oper = ASTNodeFactory.createPrefixOperator(operatorStr, headStr, precedence);
} else if (typeStr.equalsIgnoreCase("post")) {
  oper = ASTNodeFactory.createPostfixOperator(operatorStr, headStr, precedence);
} else {
  throw new ParseException("Wrong operator type: " + typeStr, 0);
ASTNodeFactory.addOperator(operatorMap, operatorTokenStartSet, operatorStr, headStr, oper);
origin: axkr/symja_android_library

ASTNode arg1Derived = derivative(f.getNode(1), var);
if (isSymbol(head, "Exp")) {
  FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Exp"));
  fun.add(f.getNode(1));
  return getDerivativeResult(arg1Derived, fun);
  FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Times"));
  fun.add(new DoubleNode(-1.0));
  fun.add(new FunctionNode(fASTFactory.createSymbol("Cos"), f.getNode(1)));
  return getDerivativeResult(arg1Derived, fun);
  FunctionNode fun = new FunctionNode(fASTFactory.createSymbol("Cos"));
  fun.add(f.getNode(1));
  return getDerivativeResult(arg1Derived, fun);
  FunctionNode exponent = fASTFactory.createFunction(fASTFactory.createSymbol("Plus"),
      new DoubleNode(-1.0), f.get(2));
  FunctionNode fun = fASTFactory.createFunction(fASTFactory.createSymbol("Times"), f.get(2),
      fASTFactory.createFunction(fASTFactory.createSymbol("Power"), f.get(1), exponent));
  return getDerivativeResult(arg1Derived, fun);
  FunctionNode fun = fASTFactory.createFunction(fASTFactory.createSymbol("Times"),
      fASTFactory.createFunction(fASTFactory.createSymbol("Log"), f.get(1)), f);
  return getDerivativeResult(arg2Derived, fun);
  FunctionNode plusResult = new FunctionNode(fASTFactory.createSymbol("Plus"));
  for (int i = 1; i < f.size(); i++) {
    FunctionNode timesResult = new FunctionNode(f.getNode(0));
origin: axkr/symja_android_library

public DoubleEvaluator(ASTNode node, boolean relaxedSyntax) {
  fASTFactory = new ASTNodeFactory(relaxedSyntax);
  fVariableMap = new HashMap<String, IDoubleValue>();
  fBooleanVariables = new HashMap<String, BooleanVariable>();
  fNode = node;
  fRelaxedSyntax = relaxedSyntax;
  if (fRelaxedSyntax) {
    if (SYMBOL_DOUBLE_MAP.get("pi") == null) {
      // init tables for relaxed mode
      for (String key : SYMBOL_DOUBLE_MAP.keySet()) {
        SYMBOL_DOUBLE_MAP.put(key.toLowerCase(), SYMBOL_DOUBLE_MAP.get(key));
      }
      for (String key : SYMBOL_BOOLEAN_MAP.keySet()) {
        SYMBOL_BOOLEAN_MAP.put(key.toLowerCase(), SYMBOL_BOOLEAN_MAP.get(key));
      }
      for (String key : FUNCTION_DOUBLE_MAP.keySet()) {
        FUNCTION_DOUBLE_MAP.put(key.toLowerCase(), FUNCTION_DOUBLE_MAP.get(key));
      }
      for (String key : FUNCTION_BOOLEAN_MAP.keySet()) {
        FUNCTION_BOOLEAN_MAP.put(key.toLowerCase(), FUNCTION_BOOLEAN_MAP.get(key));
      }
    }
  }
}
origin: org.refcodes/refcodes-criteria

      grouping = InfixOperator.RIGHT_ASSOCIATIVE;
    oper = ASTNodeFactory.createInfixOperator( operatorStr, headStr, precedence, grouping );
  oper = ASTNodeFactory.createPrefixOperator( operatorStr, headStr, precedence );
  oper = ASTNodeFactory.createPostfixOperator( operatorStr, headStr, precedence );
ASTNodeFactory.addOperator( operatorMap, operatorTokenStartSet, operatorStr, headStr, oper );
origin: org.appdapter/ext.bundle.math.symja_jas

public RuleDelayed() {
  // &RuleDelayed; &#x29F4;
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("RuleDelayed").getPrecedence(),
      " := ");
}
origin: axkr/symja_android_library

/**
 * 
 * @param node
 * @param var
 * @return
 */
public ASTNode derivative(final ASTNode node, String var) {
  SymbolNode sym = fASTFactory.createSymbol(var);
  return derivative(node, sym);
}
origin: org.appdapter/ext.bundle.math.symja_jas

public LessEqual() {
  // &leq; &#02264;
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("LessEqual").getPrecedence(),
      "&#x2264;");
}
origin: axkr/symja_android_library

private ASTNode getDerivativeResult(ASTNode arg1Derived, FunctionNode fun) {
  if (!arg1Derived.equals(new DoubleNode(1.0))) {
    FunctionNode res = new FunctionNode(fASTFactory.createSymbol("Times"));
    res.add(arg1Derived);
    res.add(fun);
    return res;
  }
  return fun;
}
origin: org.appdapter/ext.bundle.math.symja_jas

public RuleDelayed() {
  // &RuleDelayed; &#x29F4;
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("RuleDelayed").getPrecedence(),
      "&#x29F4;");
}
origin: axkr/symja_android_library

public static Operator getOperator(ISymbol head) {
  String headerStr = head.getSymbolName();
  if (Config.PARSER_USE_LOWERCASE_SYMBOLS) {
    String str = AST2Expr.PREDEFINED_SYMBOLS_MAP.get(headerStr);
    if (str != null) {
      headerStr = str;
    }
  }
  final Operator operator = ASTNodeFactory.MMA_STYLE_FACTORY.get(headerStr);
  return operator;
}
origin: axkr/symja_android_library

public Times() {
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("Times").getPrecedence(), "mrow", "&#0183;");// centerdot instead
                                              // of
                                              // invisibletimes:
                                              // "&#8290;");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public Plus() {
 super(ASTNodeFactory.MMA_STYLE_FACTORY.get("Plus").getPrecedence(), "mrow",
   "+");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public GreaterEqual() {
  // &geq; &#02265;
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("GreaterEqual").getPrecedence(), "&#x2265;");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public And() {
  // and 2227
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("And").getPrecedence(), " \\land ");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public SetDelayed() {
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("SetDelayed").getPrecedence(),
      ":=");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public Power() {
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("Power").getPrecedence(), "msup",
      "");
}
origin: org.appdapter/ext.bundle.math.symja_jas

public Times() {
  super(ASTNodeFactory.MMA_STYLE_FACTORY.get("Times").getPrecedence(),
      "\\,");
}
org.matheclipse.parser.client.operatorASTNodeFactory

Javadoc

A factory for creating ASTNode objects.

Most used methods

  • addOperator
    Adds the operator.
  • createInfixOperator
    Creates a new ASTNode object.
  • createPostfixOperator
    Creates a new ASTNode object.
  • createPrefixOperator
    Creates a new ASTNode object.
  • get
    Gets the.
  • <init>
    Create a default ASTNode factory
  • createFunction
  • createSymbol
  • toRubiString

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getSharedPreferences (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now