|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.CharDistrib
public class CharDistrib
A mixture between a multinomial distribution over a fixed set of characters (called the enumerated characters), and a uniform distribution over all characters (i.e., all unsigned 16-bit numbers).
Constructor Summary | |
---|---|
CharDistrib(char[] enumChars,
double uniformWeight)
Creates a new CharDistrib with the given enumerated characters and the given weight on the uniform distribution. |
|
CharDistrib(char[] enumChars,
double[] pi,
double uniformWeight)
Creates a new CharDistrib with the given enumerated characters, the given distribution over the enumerated characters, and the given weight on the uniform distribution. |
|
CharDistrib(java.util.List params)
Creates a new CharDistrib with the given parameters. |
Method Summary | |
---|---|
double |
getLogProb(char c)
Returns the log probability of the given character. |
double |
getProb(char c)
Returns the probability of the given character. |
double |
getProb(java.util.List args,
java.lang.Object childValue)
Returns the probability of the given value, which should be of class Character. |
char |
sampleVal()
Returns a character selected randomly according to this distribution. |
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Returns a Character object sampled randomly according to this distribution. |
Methods inherited from class blog.AbstractCondProbDistrib |
---|
getLogProb, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharDistrib(char[] enumChars, double uniformWeight)
public CharDistrib(char[] enumChars, double[] pi, double uniformWeight)
public CharDistrib(java.util.List params)
Method Detail |
---|
public double getProb(char c)
public double getProb(java.util.List args, java.lang.Object childValue)
public double getLogProb(char c)
public char sampleVal()
public java.lang.Object sampleVal(java.util.List args, Type childType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |