Examples of grow()


Examples of org.apache.lucene.util.IntsRef.grow()

    final ByteSequenceOutputs outputs = ByteSequenceOutputs.getSingleton();
    final Builder<BytesRef> builder = new Builder<BytesRef>(FST.INPUT_TYPE.BYTE1, outputs);

    final byte[] bytes = new byte[300];
    final IntsRef input = new IntsRef();
    input.grow(1);
    input.length = 1;
    final BytesRef output = new BytesRef(bytes);
    for(int arc=0;arc<6;arc++) {
      input.ints[0] = arc;
      output.bytes[0] = (byte) arc;
View Full Code Here

Examples of org.apache.lucene.util.IntsRef.grow()

        data.add(readings[i] + INTERNAL_SEPARATOR + pos);
        wordId++;
      }
      // add mapping to FST
      String token = values[0];
      scratch.grow(token.length());
      scratch.length = token.length();
      for (int i = 0; i < token.length(); i++) {
        scratch.ints[i] = (int) token.charAt(i);
      }
      fstBuilder.add(scratch, ord);
View Full Code Here

Examples of org.apache.lucene.util.IntsRef.grow()

      int maxNumOrds = 0;
      for (CategoryPath cp : e.getValue()) {
        int ordinal = taxonomyWriter.addCategory(cp);
        maxNumOrds += cp.length; // ordinal and potentially all parents
        if (ordinals.ints.length < maxNumOrds) {
          ordinals.grow(maxNumOrds);
        }
        ordinals.ints[ordinals.length++] = ordinal;
      }
      Map<String,BytesRef> categoriesData = getCategoryListData(clp, ordinals, e.getValue());
     
View Full Code Here

Examples of org.apache.lucene.util.IntsRef.grow()

        FacetLabel cp = new FacetLabel(facetField.dim, facetField.path);

        checkTaxoWriter(taxoWriter);
        int ordinal = taxoWriter.addCategory(cp);
        if (ordinals.length == ordinals.ints.length) {
          ordinals.grow(ordinals.length+1);
        }
        ordinals.ints[ordinals.length++] = ordinal;
        //System.out.println("ords[" + (ordinals.length-1) + "]=" + ordinal);
        //System.out.println("  add cp=" + cp);
View Full Code Here

Examples of org.apache.lucene.util.IntsRef.grow()

          //System.out.println("  add parents");
          // Add all parents too:
          int parent = taxoWriter.getParent(ordinal);
          while (parent > 0) {
            if (ordinals.ints.length == ordinals.length) {
              ordinals.grow(ordinals.length+1);
            }
            ordinals.ints[ordinals.length++] = parent;
            parent = taxoWriter.getParent(parent);
          }
View Full Code Here

Examples of pythagoras.f.Rectangle.grow()

                // relative to the pointer? E.g. a combo box with its menu off to the right

                // keep the bounds from overlapping the position
                if (bounds.width > fudge * 2 && bounds.height > fudge * 2) {
                    Rectangle ibounds = new Rectangle(bounds);
                    ibounds.grow(-fudge, -fudge);

                    // set up the fingerprint
                    float fingerRadius = touch().hasTouch() ? 10 : 3;
                    IPoint fingerPos = pop.pointer == null ? tpos : pop.pointer;
                    Rectangle fingerBox = new Rectangle(
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.