Class Buffer

java.lang.Object
  extended byBuffer

public class Buffer
extends java.lang.Object

This class implements operations on k-tuples needed for the computation of the entropy of a text.


Field Summary
 int head
          The last character of word.
 java.lang.String word
           
 
Constructor Summary
Buffer(java.io.Reader in, int k)
          Initializes a buffer composed of the k first characters of a text.
 
Method Summary
 void next(java.io.Reader in, int k)
          Shifts one character to the right the sliding window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

word

public java.lang.String word

head

public int head
The last character of word.

Constructor Detail

Buffer

public Buffer(java.io.Reader in,
              int k)
       throws java.io.IOException
Initializes a buffer composed of the k first characters of a text.

Method Detail

next

public void next(java.io.Reader in,
                 int k)
          throws java.io.IOException
Shifts one character to the right the sliding window.

Throws:
java.io.IOException