Class IntsRefFSTEnum<T>


  • public final class IntsRefFSTEnum<T>
    extends java.lang.Object
    Enumerates all input (IntsRef) + output pairs in an FST.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IntsRefFSTEnum.InputOutput<T>
      Holds a single input (IntsRef) + output pair.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected FST.Arc<T>[] arcs  
      protected FST<T> fst  
      protected FST.BytesReader fstReader  
      protected T NO_OUTPUT  
      protected T[] output  
      protected FST.Arc<T> scratchArc  
      protected int targetLength  
      protected int upto  
    • Constructor Summary

      Constructors 
      Constructor Description
      IntsRefFSTEnum​(FST<T> fst)
      doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
    • Field Detail

      • fst

        protected final FST<T> fst
      • arcs

        protected FST.Arc<T>[] arcs
      • output

        protected T[] output
      • NO_OUTPUT

        protected final T NO_OUTPUT
      • scratchArc

        protected final FST.Arc<T> scratchArc
      • upto

        protected int upto
      • targetLength

        protected int targetLength
    • Constructor Detail

      • IntsRefFSTEnum

        public IntsRefFSTEnum​(FST<T> fst)
        doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
    • Method Detail

      • seekCeil

        public IntsRefFSTEnum.InputOutput<T> seekCeil​(IntsRef target)
                                               throws java.io.IOException
        Seeks to smallest term that's >= target.
        Throws:
        java.io.IOException
      • seekFloor

        public IntsRefFSTEnum.InputOutput<T> seekFloor​(IntsRef target)
                                                throws java.io.IOException
        Seeks to biggest term that's <= target.
        Throws:
        java.io.IOException
      • getTargetLabel

        protected int getTargetLabel()
      • getCurrentLabel

        protected int getCurrentLabel()
      • setCurrentLabel

        protected void setCurrentLabel​(int label)
      • grow

        protected void grow()
      • rewindPrefix

        protected final void rewindPrefix()
                                   throws java.io.IOException
        Rewinds enum state to match the shared prefix between current term and target term
        Throws:
        java.io.IOException
      • doNext

        protected void doNext()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • doSeekCeil

        protected void doSeekCeil()
                           throws java.io.IOException
        Seeks to smallest term that's >= target.
        Throws:
        java.io.IOException
      • doSeekFloor

        protected void doSeekFloor()
                            throws java.io.IOException
        Seeks to largest term that's <= target.
        Throws:
        java.io.IOException
      • doSeekExact

        protected boolean doSeekExact()
                               throws java.io.IOException
        Seeks to exactly target term.
        Throws:
        java.io.IOException