edu.umd.hooka.ttables
Class TTable_monolithic_IFAs

java.lang.Object
  extended by edu.umd.hooka.ttables.TTable
      extended by edu.umd.hooka.ttables.TTable_monolithic_IFAs
All Implemented Interfaces:
Cloneable

public class TTable_monolithic_IFAs
extends TTable
implements Cloneable

Data structure that stores translation probabilities p(f|e) or counts c(f,e). The set of values (*,e) associated with a particular e are stored adjacent to one another in an array. For a given f in (f,e) the location of the f is found using a binary search. Layout: http://www.umiacs.umd.edu/~redpony/ttable-structure.png

Author:
redpony

Constructor Summary
TTable_monolithic_IFAs()
           
TTable_monolithic_IFAs(FileSystem fs, Path p, boolean load)
           
 
Method Summary
 void add(int e, int f, float delta)
           
 void clear()
           
 Object clone()
           
 IndexedFloatArray get(int e)
           
 float get(int e, int f)
           
 int getMaxE()
           
 int getMaxF()
           
 void normalize()
           
 void prune(float threshold)
           
 void readFields(DataInput in)
           
 void set(int e, IndexedFloatArray fs)
           
 void set(int e, int f, float value)
           
 String toString()
           
 void write()
           
 void write(DataOutput out)
           
 
Methods inherited from class edu.umd.hooka.ttables.TTable
prepare
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TTable_monolithic_IFAs

public TTable_monolithic_IFAs()

TTable_monolithic_IFAs

public TTable_monolithic_IFAs(FileSystem fs,
                              Path p,
                              boolean load)
                       throws IOException
Throws:
IOException
Method Detail

clone

public Object clone()
Specified by:
clone in class TTable

getMaxF

public int getMaxF()

getMaxE

public int getMaxE()

add

public void add(int e,
                int f,
                float delta)
Specified by:
add in class TTable

set

public void set(int e,
                int f,
                float value)
Specified by:
set in class TTable

set

public void set(int e,
                IndexedFloatArray fs)
Specified by:
set in class TTable

get

public float get(int e,
                 int f)
Specified by:
get in class TTable

get

public IndexedFloatArray get(int e)

prune

public void prune(float threshold)

normalize

public void normalize()
Specified by:
normalize in class TTable

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

write

public void write()
           throws IOException
Specified by:
write in class TTable
Throws:
IOException

clear

public void clear()
Specified by:
clear in class TTable