fipaos.parser.acl.bitefficient
Class EncoderCodetable


public class EncoderCodetable

Implementation of codetable for fipa-bitefficient-std.

Author:
Heikki Helin, Mikko Laukkanen

Constructor Summary
EncoderCodetable(int sz)
          Initialize the code table with given size.

Method Summary
 intinsert(String s)
          Inserts a string to codetable.
 intlookup(String s)
           

Constructor Detail

EncoderCodetable

public EncoderCodetable(int sz)
Initialize the code table with given size.
Parameters:
sz - Size of the codetable in bits. According to FIPA
specs, this shall be a number between 8 and 16.
Method Detail

insert

public int insert(String s)
Inserts a string to codetable. If the string is already in
code table, its code is returned, and the string is moved
to the end of LRU list.
Parameters:
s - String to insert
Returns: Code number for string.

lookup

public int lookup(String s)
Parameters:
s - The string to lookup
Returns: The code number for the string if found, -1 otherwise

Association Links

to Class fipaos.parser.acl.bitefficient.EncoderCodetable.Entry

ct Hash table

to Class fipaos.parser.acl.bitefficient.EncoderCodetable.Entry