congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FSTEnum.getArc
Code IndexAdd Tabnine to your IDE (free)

How to use
getArc
method
in
org.apache.lucene.util.fst.FSTEnum

Best Java code snippets using org.apache.lucene.util.fst.FSTEnum.getArc (Showing top 20 results out of 315)

origin: org.apache.lucene/lucene-core

/** Rewinds enum state to match the shared prefix between
 *  current term and target term */
protected final void rewindPrefix() throws IOException {
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
  return;
 }
 //System.out.println("  rewind upto=" + upto + " vs targetLength=" + targetLength);
 final int currentLimit = upto;
 upto = 1;
 while (upto < currentLimit && upto <= targetLength+1) {
  final int cmp = getCurrentLabel() - getTargetLabel();
  if (cmp < 0) {
   // seek forward
   //System.out.println("    seek fwd");
   break;
  } else if (cmp > 0) {
   // seek backwards -- reset this arc to the first arc
   final FST.Arc<T> arc = getArc(upto);
   fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
   //System.out.println("    seek first arc");
   break;
  }
  upto++;
 }
 //System.out.println("  fall through upto=" + upto);
}
origin: org.apache.lucene/lucene-core

protected void doNext() throws IOException {
 //System.out.println("FE: next upto=" + upto);
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
 } else {
  // pop
  //System.out.println("  check pop curArc target=" + arcs[upto].target + " label=" + arcs[upto].label + " isLast?=" + arcs[upto].isLast());
  while (arcs[upto].isLast()) {
   upto--;
   if (upto == 0) {
    //System.out.println("  eof");
    return;
   }
  }
  fst.readNextArc(arcs[upto], fstReader);
 }
 pushFirst();
}
origin: org.apache.lucene/lucene-core

/** doFloor controls the behavior of advance: if it's true
 *  doFloor is true, advance positions to the biggest
 *  term before target.  */
protected FSTEnum(FST<T> fst) {
 this.fst = fst;
 fstReader = fst.getBytesReader();
 NO_OUTPUT = fst.outputs.getNoOutput();
 fst.getFirstArc(getArc(0));
 output[0] = NO_OUTPUT;
}
origin: org.apache.lucene/lucene-core

private void pushLast() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  setCurrentLabel(arc.label);
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  incr();
  arc = fst.readLastTargetArc(arc, getArc(upto), fstReader);
 }
}
origin: org.apache.lucene/lucene-core

private void pushFirst() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  //System.out.println("  pushFirst label=" + (char) arc.label + " upto=" + upto + " output=" + fst.outputs.outputToString(output[upto]));
  setCurrentLabel(arc.label);
  incr();
  
  final FST.Arc<T> nextArc = getArc(upto);
  fst.readFirstTargetArc(arc, nextArc, fstReader);
  arc = nextArc;
 }
}
origin: org.apache.lucene/lucene-core

FST.Arc<T> arc = getArc(upto-1);
int targetLabel = getTargetLabel();
 final FST.Arc<T> nextArc = fst.findTargetArc(targetLabel, arc, getArc(upto), fstReader);
 if (nextArc == null) {
  fst.readFirstTargetArc(arc, getArc(upto), fstReader);
origin: org.apache.lucene/lucene-core

FST.Arc<T> arc = getArc(upto);
int targetLabel = getTargetLabel();
   arc = fst.readFirstTargetArc(arc, getArc(upto), fstReader);
   targetLabel = getTargetLabel();
   continue;
    fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
    if (arc.label < targetLabel) {
    arc = getArc(upto);
   arc = fst.readFirstTargetArc(arc, getArc(upto), fstReader);
   targetLabel = getTargetLabel();
  } else if (arc.label > targetLabel) {
    fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
    if (arc.label < targetLabel) {
    arc = getArc(upto);
origin: org.apache.lucene/lucene-core

FST.Arc<T> arc = getArc(upto);
int targetLabel = getTargetLabel();
   arc = fst.readFirstTargetArc(arc, getArc(upto), fstReader);
   targetLabel = getTargetLabel();
   continue;
     return;
    final FST.Arc<T> prevArc = getArc(upto);
   arc = fst.readFirstTargetArc(arc, getArc(upto), fstReader);
   targetLabel = getTargetLabel();
  } else if (arc.label > targetLabel) {
     return;
    final FST.Arc<T> prevArc = getArc(upto);
origin: harbby/presto-connectors

protected void doNext() throws IOException {
 //System.out.println("FE: next upto=" + upto);
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
 } else {
  // pop
  //System.out.println("  check pop curArc target=" + arcs[upto].target + " label=" + arcs[upto].label + " isLast?=" + arcs[upto].isLast());
  while (arcs[upto].isLast()) {
   upto--;
   if (upto == 0) {
    //System.out.println("  eof");
    return;
   }
  }
  fst.readNextArc(arcs[upto], fstReader);
 }
 pushFirst();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

protected void doNext() throws IOException {
 //System.out.println("FE: next upto=" + upto);
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
 } else {
  // pop
  //System.out.println("  check pop curArc target=" + arcs[upto].target + " label=" + arcs[upto].label + " isLast?=" + arcs[upto].isLast());
  while (arcs[upto].isLast()) {
   upto--;
   if (upto == 0) {
    //System.out.println("  eof");
    return;
   }
  }
  fst.readNextArc(arcs[upto], fstReader);
 }
 pushFirst();
}
origin: org.infinispan/infinispan-embedded-query

protected void doNext() throws IOException {
 //System.out.println("FE: next upto=" + upto);
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
 } else {
  // pop
  //System.out.println("  check pop curArc target=" + arcs[upto].target + " label=" + arcs[upto].label + " isLast?=" + arcs[upto].isLast());
  while (arcs[upto].isLast()) {
   upto--;
   if (upto == 0) {
    //System.out.println("  eof");
    return;
   }
  }
  fst.readNextArc(arcs[upto], fstReader);
 }
 pushFirst();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** doFloor controls the behavior of advance: if it's true
 *  doFloor is true, advance positions to the biggest
 *  term before target.  */
protected FSTEnum(FST<T> fst) {
 this.fst = fst;
 fstReader = fst.getBytesReader();
 NO_OUTPUT = fst.outputs.getNoOutput();
 fst.getFirstArc(getArc(0));
 output[0] = NO_OUTPUT;
}
origin: harbby/presto-connectors

/** doFloor controls the behavior of advance: if it's true
 *  doFloor is true, advance positions to the biggest
 *  term before target.  */
protected FSTEnum(FST<T> fst) {
 this.fst = fst;
 fstReader = fst.getBytesReader();
 NO_OUTPUT = fst.outputs.getNoOutput();
 fst.getFirstArc(getArc(0));
 output[0] = NO_OUTPUT;
}
origin: org.infinispan/infinispan-embedded-query

/** doFloor controls the behavior of advance: if it's true
 *  doFloor is true, advance positions to the biggest
 *  term before target.  */
protected FSTEnum(FST<T> fst) {
 this.fst = fst;
 fstReader = fst.getBytesReader();
 NO_OUTPUT = fst.outputs.getNoOutput();
 fst.getFirstArc(getArc(0));
 output[0] = NO_OUTPUT;
}
origin: org.infinispan/infinispan-embedded-query

private void pushLast() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  setCurrentLabel(arc.label);
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  incr();
  arc = fst.readLastTargetArc(arc, getArc(upto), fstReader);
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void pushLast() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  setCurrentLabel(arc.label);
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  incr();
  arc = fst.readLastTargetArc(arc, getArc(upto), fstReader);
 }
}
origin: harbby/presto-connectors

private void pushLast() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  setCurrentLabel(arc.label);
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  incr();
  arc = fst.readLastTargetArc(arc, getArc(upto), fstReader);
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

private void pushFirst() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  //System.out.println("  pushFirst label=" + (char) arc.label + " upto=" + upto + " output=" + fst.outputs.outputToString(output[upto]));
  setCurrentLabel(arc.label);
  incr();
  
  final FST.Arc<T> nextArc = getArc(upto);
  fst.readFirstTargetArc(arc, nextArc, fstReader);
  arc = nextArc;
 }
}
origin: org.infinispan/infinispan-embedded-query

private void pushFirst() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  //System.out.println("  pushFirst label=" + (char) arc.label + " upto=" + upto + " output=" + fst.outputs.outputToString(output[upto]));
  setCurrentLabel(arc.label);
  incr();
  
  final FST.Arc<T> nextArc = getArc(upto);
  fst.readFirstTargetArc(arc, nextArc, fstReader);
  arc = nextArc;
 }
}
origin: harbby/presto-connectors

private void pushFirst() throws IOException {
 FST.Arc<T> arc = arcs[upto];
 assert arc != null;
 while (true) {
  output[upto] = fst.outputs.add(output[upto-1], arc.output);
  if (arc.label == FST.END_LABEL) {
   // Final node
   break;
  }
  //System.out.println("  pushFirst label=" + (char) arc.label + " upto=" + upto + " output=" + fst.outputs.outputToString(output[upto]));
  setCurrentLabel(arc.label);
  incr();
  
  final FST.Arc<T> nextArc = getArc(upto);
  fst.readFirstTargetArc(arc, nextArc, fstReader);
  arc = nextArc;
 }
}
org.apache.lucene.util.fstFSTEnumgetArc

Popular methods of FSTEnum

  • doSeekCeil
    Seeks to smallest term that's >= target.
  • doSeekExact
    Seeks to exactly target term.
  • doSeekFloor
    Seeks to largest term that's <= target.
  • getCurrentLabel
  • getTargetLabel
  • grow
  • incr
  • pushFirst
  • pushLast
  • rewindPrefix
    Rewinds enum state to match the shared prefix between current term and target term
  • setCurrentLabel
  • setCurrentLabel

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now