|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.UniformChoice
public class UniformChoice
CPD that takes a set of objects (an instance of the ObjectSet interface) as an argument, and defines a uniform distribution over this set.
Constructor Summary | |
---|---|
UniformChoice()
Creates a UniformChoice CPD. |
|
UniformChoice(java.util.List params)
Creates a UniformChoice CPD. |
Method Summary | |
---|---|
double |
getProb(java.util.List args,
java.lang.Object value)
Takes a single argument, namely a set S. |
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Takes a single argument, namely a finite set S. |
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 UniformChoice()
public UniformChoice(java.util.List params)
java.lang.IllegalArgumentException
- if params
is non-emptyMethod Detail |
---|
public double getProb(java.util.List args, java.lang.Object value)
value
is in S, and otherwise 0.
If S is empty, returns 1 if the value is Model.NULL, and 0
otherwise.
java.lang.IllegalArgumentException
- if args
contains anything
other than a single argument of
class ObjectSet.public java.lang.Object sampleVal(java.util.List args, Type childType)
java.lang.IllegalArgumentException
- if args
contains anything
other than a single argument of
class ObjectSet.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |