public class BetaBinomial
extends java.lang.Object
implements blang.core.Model, blang.core.UnivariateModel<blang.core.IntVar>, blang.core.ForwardSimulator
Modifier and Type | Class and Description |
---|---|
static class |
BetaBinomial.$generated__0_class |
static class |
BetaBinomial.Builder |
Constructor and Description |
---|
BetaBinomial(blang.core.IntVar realization,
java.util.function.Supplier<blang.core.IntVar> $generated__numberOfTrials,
java.util.function.Supplier<blang.core.RealVar> $generated__alpha,
java.util.function.Supplier<blang.core.RealVar> $generated__beta)
Note: the generated code has the following properties used at runtime:
- all arguments are annotated with a BlangVariable annotation
- params additionally have a Param annotation
- the order of the arguments is as follows:
- first, all the random variables in the order they occur in the blang file
- second, all the params in the order they occur in the blang file
|
Modifier and Type | Method and Description |
---|---|
static BetaBinomial.Builder |
builderFromCommandLine() |
java.util.Collection<blang.core.ModelComponent> |
components()
A component can be either a distribution, support constraint, or another model
which recursively defines additional components.
|
static blang.core.IntDistribution |
distribution(blang.core.IntVar numberOfTrials,
blang.core.RealVar alpha,
blang.core.RealVar beta)
Returns an instance with fixed parameters values and conforming the Distribution interface.
|
void |
generate(java.util.Random rand) |
blang.core.RealVar |
getAlpha() |
blang.core.RealVar |
getBeta() |
blang.core.IntVar |
getNumberOfTrials() |
blang.core.IntVar |
getRealization() |
static void |
main(java.lang.String[] arguments)
Utility main method for posterior inference on this model
|
blang.core.IntVar |
realization() |
public BetaBinomial(blang.core.IntVar realization, java.util.function.Supplier<blang.core.IntVar> $generated__numberOfTrials, java.util.function.Supplier<blang.core.RealVar> $generated__alpha, java.util.function.Supplier<blang.core.RealVar> $generated__beta)
public static BetaBinomial.Builder builderFromCommandLine()
public blang.core.IntVar getRealization()
public blang.core.IntVar getNumberOfTrials()
public blang.core.RealVar getAlpha()
public blang.core.RealVar getBeta()
public static void main(java.lang.String[] arguments)
public java.util.Collection<blang.core.ModelComponent> components()
components
in interface blang.core.Model
public void generate(java.util.Random rand)
generate
in interface blang.core.ForwardSimulator
public blang.core.IntVar realization()
realization
in interface blang.core.UnivariateModel<blang.core.IntVar>
public static blang.core.IntDistribution distribution(blang.core.IntVar numberOfTrials, blang.core.RealVar alpha, blang.core.RealVar beta)