congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Notification (javax.management)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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