textclassifier.discretization
Class LookupTable

java.lang.Object
  extended by textclassifier.discretization.LookupTable

public class LookupTable
extends java.lang.Object

Class that stores ssociated array of attribute name and its discreted intervals


Constructor Summary
LookupTable()
          Constructor of the class
 
Method Summary
 void createKey(java.lang.String att_name)
          Creates a new record with a new atribute and empty list of intervals
 DiscInterval findInterval(java.lang.String att_name, double att_value)
          Finds an interval with given attribute and specified value inside of it
 java.util.HashMap<java.lang.String,java.util.ArrayList<DiscInterval>> getData()
          Returns all the stored data
 void insert(java.lang.String att_name, double min, double max)
          Inserts a new interval for a specified attribute
 void insertColumn(java.lang.String att_name, java.util.ArrayList<DiscInterval> coldata)
          Inserts a new attribute and its intervals into the hashmap of intervals
 void printAtt(java.lang.String att_name)
          Prints the list of intervals created over a specified attribute
 void printColumns()
          Prints all created intervals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupTable

public LookupTable()
Constructor of the class

Method Detail

getData

public java.util.HashMap<java.lang.String,java.util.ArrayList<DiscInterval>> getData()
Returns all the stored data

Returns:
hashmap structure with all the intervals

createKey

public void createKey(java.lang.String att_name)
Creates a new record with a new atribute and empty list of intervals

Parameters:
att_name - new attribute name

insert

public void insert(java.lang.String att_name,
                   double min,
                   double max)
Inserts a new interval for a specified attribute

Parameters:
att_name - attribute name
min - minimum value of the interval
max - maximum value of the interval

findInterval

public DiscInterval findInterval(java.lang.String att_name,
                                 double att_value)
Finds an interval with given attribute and specified value inside of it

Parameters:
att_name - attribute name
att_value - value of the attribute
Returns:
discretized interval, given value must be between the border of it

printAtt

public void printAtt(java.lang.String att_name)
Prints the list of intervals created over a specified attribute

Parameters:
att_name - attribute name

insertColumn

public void insertColumn(java.lang.String att_name,
                         java.util.ArrayList<DiscInterval> coldata)
Inserts a new attribute and its intervals into the hashmap of intervals

Parameters:
att_name - attribute name
coldata - list of discretized intervals

printColumns

public void printColumns()
Prints all created intervals