edu.umd.hooka.ttables
Class TTable_monolithic
java.lang.Object
edu.umd.hooka.ttables.TTable
edu.umd.hooka.ttables.TTable_monolithic
- All Implemented Interfaces:
- Cloneable
public class TTable_monolithic
- 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
| Methods inherited from class edu.umd.hooka.ttables.TTable |
prepare |
TTable_monolithic
public TTable_monolithic()
TTable_monolithic
public TTable_monolithic(FileSystem fs,
Path p)
throws IOException
- Throws:
IOException
TTable_monolithic
public TTable_monolithic(int[] e,
int[] ef,
int maxF)
TTable_monolithic
public TTable_monolithic(int[] e,
int[] ef,
int maxF,
FileSystem fs,
Path p)
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
setDistribution
public void setDistribution(float[] x)
setNullDistribution
public void setNullDistribution(float[] x)
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
clear
public void clear()
- Specified by:
clear in class TTable
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