Class CIndexMap

java.lang.Object
   |
   +----CIndexMap

public class CIndexMap
extends Object
This class implements the search engine's word list as a 3-letter prefixed, sorted array of word-to-ID mappings.

Version:
0.86
Author:
Jörg Caumanns

Constructor Index

 o CIndexMap()
Setup a new index map

Method Index

 o dump(PrintStream)
 o get(String)
get a given word's ID and use count encoded as a WordLink.
 o getMatchingWordIDs(String)
NYI: get all words that match a given wildcard expression
 o getV(String)
for internal use by CIndex only: look up a word's ID
 o optimize(int[])
optimize the word list by exchanging the previously used Vector with a 3-letter prefixed, sorted array.
 o putV(String, int)
for internal use by CIndex only: append a word-to-ID mapping
 o replaceWordID(String, int)
for internal use by CIndex only: change a word's ID
 o statistics(PrintStream)

Constructors

 o CIndexMap
 public CIndexMap()
Setup a new index map

Methods

 o getV
 public int getV(String str)
for internal use by CIndex only: look up a word's ID

 o replaceWordID
 public void replaceWordID(String str,
                           int idNew)
for internal use by CIndex only: change a word's ID

 o putV
 public void putV(String str,
                  int id)
for internal use by CIndex only: append a word-to-ID mapping

 o optimize
 public void optimize(int aLen[])
optimize the word list by exchanging the previously used Vector with a 3-letter prefixed, sorted array.

 o get
 public int get(String str)
get a given word's ID and use count encoded as a WordLink.

Parameters:
str - - word to look for
Returns:
integer > 0 encoded as WordLink if the word was found, otherwise 0;
 o getMatchingWordIDs
 public Vector getMatchingWordIDs(String mask)
NYI: get all words that match a given wildcard expression

 o dump
 public void dump(PrintStream pf)
 o statistics
 public void statistics(PrintStream pout)