Examples of floor()


Examples of org.apache.lucene.util.automaton.CompiledAutomaton.floor()

      throws IOException {
    final List<CompiledAutomaton> runAutomata = initAutomata(editDistance);
    if (editDistance < runAutomata.size()) {
      //if (BlockTreeTermsWriter.DEBUG) System.out.println("FuzzyTE.getAEnum: ed=" + editDistance + " lastTerm=" + (lastTerm==null ? "null" : lastTerm.utf8ToString()));
      final CompiledAutomaton compiled = runAutomata.get(editDistance);
      return new AutomatonFuzzyTermsEnum(terms.intersect(compiled, lastTerm == null ? null : compiled.floor(lastTerm, new BytesRef())),
                                         runAutomata.subList(0, editDistance + 1).toArray(new CompiledAutomaton[editDistance + 1]));
    } else {
      return null;
    }
  }
View Full Code Here

Examples of org.apache.lucene.util.automaton.CompiledAutomaton.floor()

      throws IOException {
    final List<CompiledAutomaton> runAutomata = initAutomata(editDistance);
    if (editDistance < runAutomata.size()) {
      //if (BlockTreeTermsWriter.DEBUG) System.out.println("FuzzyTE.getAEnum: ed=" + editDistance + " lastTerm=" + (lastTerm==null ? "null" : lastTerm.utf8ToString()));
      final CompiledAutomaton compiled = runAutomata.get(editDistance);
      return new AutomatonFuzzyTermsEnum(terms.intersect(compiled, lastTerm == null ? null : compiled.floor(lastTerm, new BytesRef())),
                                         runAutomata.subList(0, editDistance + 1).toArray(new CompiledAutomaton[editDistance + 1]));
    } else {
      return null;
    }
  }
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.floor()

        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
View Full Code Here

Examples of org.exist.xquery.value.NumericValue.floor()

          if (item instanceof NumericValue) {
        value = (NumericValue) item;
      } else {
        value = (NumericValue) item.convertTo(Type.NUMBER);
      }
        result = value.floor();
        }
       
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
       
View Full Code Here

Examples of org.pdf4j.saxon.value.NumericValue.floor()

        if (val0==null) return null;
        NumericValue val = (NumericValue)val0;

        switch (operation) {
            case FLOOR:
                return val.floor();
            case CEILING:
                return val.ceiling();
            case ROUND:
                return val.round();
            case HALF_EVEN:
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.