public class SampMog
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) double[] |
cumulative
cumulative weights, for sample generation
|
static int |
max_n
maximum number of Gaussian components
|
(package private) double[] |
mean
mean parameters for the Gaussian components
|
(package private) int |
n
actual number of Gaussian components
|
java.util.Random |
rng
random number generator in use
|
(package private) double[] |
stdv
standard deviation parameters for the Gaussian components
|
(package private) double[] |
var
variance parameters for the Gaussian components
|
(package private) double[] |
weight
weights associated with the Gaussian components
|
Constructor and Description |
---|
SampMog()
default constructor
|
SampMog(java.util.Random rng)
constructor with specified RNG
|
Modifier and Type | Method and Description |
---|---|
void |
generate(int ns,
double[] sample)
Generate samples from the specified mixture-of-Gaussian distribution.
|
static int |
getMaxNumber()
Get the maximum number of Gaussian components.
|
int |
getNumber()
Get the number of Gaussian components.
|
void |
set(int n,
double[] wts,
double[] mm,
double[] vv)
Specify the mixture-of-Gaussian configuration.
|
void |
setMeans(double[] mm)
Specify the mean parameters for the Gaussian components.
|
void |
setNumber(int n)
Set the number of Gaussian components.
|
void |
setVars(double[] vv)
Specify the variance parameters for the Gaussian components.
|
void |
setWeights(double[] wts)
Specify the weights for the Gaussian components.
|
public java.util.Random rng
public static final int max_n
int n
final double[] weight
final double[] mean
final double[] var
final double[] cumulative
final double[] stdv
public SampMog()
public SampMog(java.util.Random rng)
public void generate(int ns, double[] sample)
ns
- number of samples to generatesample
- output array of generated samplespublic static int getMaxNumber()
public int getNumber()
public void set(int n, double[] wts, double[] mm, double[] vv)
public void setNumber(int n)
public void setWeights(double[] wts)
public void setMeans(double[] mm)
public void setVars(double[] vv)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.