Examples of FunctionPattern


Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

        expr = compiler.compile(opPos + 2);
      }

      axis = Axis.FILTEREDLIST;
      predicateAxis = Axis.FILTEREDLIST;
      ai = new FunctionPattern(expr, axis, predicateAxis);
      simpleInit = true;
      break;
    case OpCodes.FROM_ROOT :
      whatToShow = DTMFilter.SHOW_DOCUMENT
                   | DTMFilter.SHOW_DOCUMENT_FRAGMENT;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

    case OpCodes.OP_FUNCTION :
      if(DEBUG)
        System.out.println("MATCH_FUNCTION: "+m_currentPattern);
      addMagicSelf = false;
      argLen = getOp(opPos + OpMap.MAPINDEX_LENGTH);
      pattern = new FunctionPattern(compileFunction(opPos), Axis.PARENT, Axis.CHILD);
      break;
    case OpCodes.FROM_ROOT :
      if(DEBUG)
        System.out.println("FROM_ROOT, "+m_currentPattern);
      addMagicSelf = false;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

    case OpCodes.OP_FUNCTION :
      if(DEBUG)
        System.out.println("MATCH_FUNCTION: "+m_currentPattern);
      addMagicSelf = false;
      argLen = getOp(opPos + OpMap.MAPINDEX_LENGTH);
      pattern = new FunctionPattern(compileFunction(opPos), Axis.PARENT, Axis.CHILD);
      break;
    case OpCodes.FROM_ROOT :
      if(DEBUG)
        System.out.println("FROM_ROOT, "+m_currentPattern);
      addMagicSelf = false;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

        expr = compiler.compile(opPos + 2);
      }

      axis = Axis.FILTEREDLIST;
      predicateAxis = Axis.FILTEREDLIST;
      ai = new FunctionPattern(expr, axis, predicateAxis);
      simpleInit = true;
      break;
    case OpCodes.FROM_ROOT :
      whatToShow = DTMFilter.SHOW_DOCUMENT
                   | DTMFilter.SHOW_DOCUMENT_FRAGMENT;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

        expr = compiler.compile(opPos + 2);
      }

      axis = Axis.FILTEREDLIST;
      predicateAxis = Axis.FILTEREDLIST;
      ai = new FunctionPattern(expr, axis, predicateAxis);
      simpleInit = true;
      break;
    case OpCodes.FROM_ROOT :
      whatToShow = DTMFilter.SHOW_DOCUMENT
                   | DTMFilter.SHOW_DOCUMENT_FRAGMENT;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

    case OpCodes.OP_FUNCTION :
      if(DEBUG)
        System.out.println("MATCH_FUNCTION: "+m_currentPattern);
      addMagicSelf = false;
      argLen = getOp(opPos + OpMap.MAPINDEX_LENGTH);
      pattern = new FunctionPattern(compileFunction(opPos), Axis.PARENT, Axis.CHILD);
      break;
    case OpCodes.FROM_ROOT :
      if(DEBUG)
        System.out.println("FROM_ROOT, "+m_currentPattern);
      addMagicSelf = false;
View Full Code Here

Examples of com.sun.org.apache.xpath.internal.patterns.FunctionPattern

        expr = compiler.compile(opPos + 2);
      }

      axis = Axis.FILTEREDLIST;
      predicateAxis = Axis.FILTEREDLIST;
      ai = new FunctionPattern(expr, axis, predicateAxis);
      simpleInit = true;
      break;
    case OpCodes.FROM_ROOT :
      whatToShow = DTMFilter.SHOW_DOCUMENT
                   | DTMFilter.SHOW_DOCUMENT_FRAGMENT;
View Full Code Here

Examples of jmathexpr.util.pattern.FunctionPattern

     * @param equality the equality to test
     * @param x the unknown in the equation
     * @return true if the equality is a radical equation
     */
    public static boolean isA(Equality equality, Variable x) {
        return equality.contains(new Sqrt(new FunctionPattern(x)));
    }
View Full Code Here

Examples of jmathexpr.util.pattern.FunctionPattern

       
        @Override
        public boolean matches(Expression expr) {
            target = expr;
           
            return expr.contains(new Sqrt(new FunctionPattern(x)));
        }
View Full Code Here

Examples of jmathexpr.util.pattern.FunctionPattern

    }
   
    private Map<Expression, List<Expression>> selectLikeTerms(List<Expression> evaluated) {
        Map<Expression, List<Expression>> selected = new HashMap(); // ai*f(x) -> a1, a2, ... an
        TerminationPattern c = new Constant();
        TerminationPattern f = new FunctionPattern(new Variable());
        ExpressionPattern p = new Multiplication(c, f);
       
        for (Expression e : evaluated) {
            if (e.isConstant()) {
                continue;
            } else if (p.matches(e)) {
                addToSelectionMap(selected, f.hit(), c.hit());
            } else {
                addToSelectionMap(selected, e, Naturals.one());
            }
        }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.