Class Element

java.lang.Object
  extended byElement

public class Element
extends java.lang.Object

This class implements operations on the hashtable of kuples of a text as a preparation to the computation of its entropy.


Constructor Summary
Element(java.lang.String s, float f)
          Creates an Element composed of a string and a float (its frequency).
 
Method Summary
static void add(java.lang.String s, java.util.Hashtable table)
          Adds an entry to the Hashtable updating the frequency if the element is already present.
static void count(java.util.Hashtable table, float[] s)
          Returns in s the frequencies of the words appearing in the table table.
static void main(java.lang.String[] args)
           
static void show(java.util.Hashtable table, int theshold)
          Prints the list of elements of the table table whith frequency at least theshold.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element

public Element(java.lang.String s,
               float f)
Creates an Element composed of a string and a float (its frequency).

Method Detail

toString

public java.lang.String toString()

add

public static void add(java.lang.String s,
                       java.util.Hashtable table)
Adds an entry to the Hashtable updating the frequency if the element is already present.


count

public static void count(java.util.Hashtable table,
                         float[] s)
Returns in s the frequencies of the words appearing in the table table.


show

public static void show(java.util.Hashtable table,
                        int theshold)
Prints the list of elements of the table table whith frequency at least theshold.


main

public static void main(java.lang.String[] args)