Examples of skipTo()


Examples of org.amplafi.json.JSONTokener.skipTo()

            JSONTokener jt = new JSONTokener("{op:'test', to:'session', pre:1}{op:'test', to:'session', pre:2}");
            j = new JSONObject(jt);
            System.out.println(j.toString());
            System.out.println("pre: " + j.optInt("pre"));
            int i = jt.skipTo('{');
            System.out.println(i);
            j = new JSONObject(jt);
            System.out.println(j.toString());
            System.out.println("");
View Full Code Here

Examples of org.apache.commons.math3.random.SobolSequenceGenerator.skipTo()

        return points;
    }
   
    public static List<Vector2D> makeRandom(int samples) {
        SobolSequenceGenerator generator = new SobolSequenceGenerator(2);
        generator.skipTo(999999);
        List<Vector2D> points = new ArrayList<Vector2D>();
        for (double i = 0; i < samples; i++) {
            double[] vector = generator.nextVector();
            vector[0] = vector[0] * 2 - 1;
            vector[1] = vector[1] * 2 - 1;
View Full Code Here

Examples of org.apache.jackrabbit.core.query.lucene.hits.Hits.skipTo()

                // filter out documents that do not match the name test
                if (nameTest != null) {
                    Query nameQuery = new NameQuery(nameTest, version, nsMappings);
                    Hits nameHits = new ScorerHits(nameQuery.weight(searcher).scorer(reader));
                    for (int i = hits.nextSetBit(0); i >= 0; i = hits.nextSetBit(i + 1)) {
                        int doc = nameHits.skipTo(i);
                        if (doc == -1) {
                            // no more name tests, clear remaining
                            hits.clear(i, hits.length());
                        } else {
                            // assert doc >= i
View Full Code Here

Examples of org.apache.jackrabbit.core.query.lucene.hits.ScorerHits.skipTo()

                // filter out documents that do not match the name test
                if (nameTest != null) {
                    Query nameQuery = new NameQuery(nameTest, version, nsMappings);
                    Hits nameHits = new ScorerHits(nameQuery.weight(searcher).scorer(reader));
                    for (int i = hits.nextSetBit(0); i >= 0; i = hits.nextSetBit(i + 1)) {
                        int doc = nameHits.skipTo(i);
                        if (doc == -1) {
                            // no more name tests, clear remaining
                            hits.clear(i, hits.length());
                        } else {
                            // assert doc >= i
View Full Code Here

Examples of org.apache.lucene.facet.search.CategoryListIterator.skipTo()

    for (int i = 0; i < data.length; i++) {
      Set<Integer> values = new HashSet<Integer>();
      for (int j = 0; j < data[i].length; j++) {
        values.add(data[i][j]);
      }
      cli.skipTo(i);
      long cat;
      while ((cat = cli.nextCategory()) < Integer.MAX_VALUE) {
        assertTrue("expected category not found: " + cat, values.contains((int) cat));
        totalCategories ++;
      }
View Full Code Here

Examples of org.apache.lucene.facet.search.PayloadIntDecodingIterator.skipTo()

    for (int i = 0; i < data.length; i++) {
      Set<Integer> values = new HashSet<Integer>();
      for (int j = 0; j < data[i].length; j++) {
        values.add(data[i][j]);
      }
      cli.skipTo(i);
      long cat;
      while ((cat = cli.nextCategory()) < Integer.MAX_VALUE) {
        assertTrue("expected category not found: " + cat, values.contains((int) cat));
        totalCategories ++;
      }
View Full Code Here

Examples of org.apache.lucene.index.TermDocs.skipTo()

        return new DocIdSetIterator(){

          private int _doc = -1;
          @Override
          public int advance(int target) throws IOException {
            if (td.skipTo(target)){
              _doc = td.doc();
            }
            else{
              td.close();
              _doc= DocIdSetIterator.NO_MORE_DOCS;
View Full Code Here

Examples of org.apache.lucene.index.TermDocs.skipTo()

    if (aprioriTermDocs.skipTo(100)) {
      assertTrue(testTermDocs.skipTo(100));
      assertEquals(aprioriTermDocs.freq(), testTermDocs.freq());
      assertEquals(aprioriTermDocs.doc(), testTermDocs.doc());
    } else {
      assertFalse(testTermDocs.skipTo(100));
    }


    if (aprioriTermDocs.next()) {
      assertTrue(testTermDocs.next());
View Full Code Here

Examples of org.apache.lucene.index.TermDocs.skipTo()

    } else {
      assertFalse(testTermDocs.next());
    }

    if (aprioriTermDocs.skipTo(110)) {
      assertTrue(testTermDocs.skipTo(110));
      assertEquals(aprioriTermDocs.freq(), testTermDocs.freq());
      assertEquals(aprioriTermDocs.doc(), testTermDocs.doc());
    } else {
      assertFalse(testTermDocs.skipTo(110));
    }
View Full Code Here

Examples of org.apache.lucene.index.TermDocs.skipTo()

    if (aprioriTermDocs.skipTo(110)) {
      assertTrue(testTermDocs.skipTo(110));
      assertEquals(aprioriTermDocs.freq(), testTermDocs.freq());
      assertEquals(aprioriTermDocs.doc(), testTermDocs.doc());
    } else {
      assertFalse(testTermDocs.skipTo(110));
    }

    if (aprioriTermDocs.skipTo(10)) {
      assertTrue(testTermDocs.skipTo(10));
      assertEquals(aprioriTermDocs.freq(), testTermDocs.freq());
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.