blog
Interface CondProbDistrib

All Known Implementing Classes:
AbstractCondProbDistrib, Bernoulli, Beta, BinaryBernoulliDistrib, Binomial, BoundedGeometric, Categorical, CharDistrib, ChooseFromArgs, DetCondProbDistrib, EqualsCPD, Exponential, Gamma, Gaussian, Geometric, Iota, LinearGaussian, MixtureDistrib, MultivarGaussian, NatNumDistribWithTail, NegativeBinomial, Poisson, RoundedLogNormal, StringEditModel, StringEditModelWithJumps, TabularCPD, UniformChoice, UniformInt, UniformReal, UniformVector, UnivarGaussian

public interface CondProbDistrib

An interface which all user-defined conditional probability distributions (CPDs), as well as the EqualsCPD class, are expected to implement.


Method Summary
 double getLogProb(java.util.List args, java.lang.Object childValue)
          Returns the natural log of the value returned by getProb.
 double getProb(java.util.List args, java.lang.Object childValue)
          For a discrete distribution, returns the conditional probability of childValue given the argument values args.
 java.lang.Object sampleVal(java.util.List args, Type childType)
          Samples a value according to this CPD given the args .
 

Method Detail

getProb

double getProb(java.util.List args,
               java.lang.Object childValue)
For a discrete distribution, returns the conditional probability of childValue given the argument values args. For a continuous distribution, returns the conditional probability density at childValue.


getLogProb

double getLogProb(java.util.List args,
                  java.lang.Object childValue)
Returns the natural log of the value returned by getProb.


sampleVal

java.lang.Object sampleVal(java.util.List args,
                           Type childType)
Samples a value according to this CPD given the args . The object returned should be of the specified type.