public class AR1Variate extends RandomVariateBase
Modifier and Type | Field and Description |
---|---|
private double |
alpha |
private double |
initialValue |
protected double |
lastValue |
private RandomVariate |
noiseGenerator |
private double |
noiseVariance |
rng
Constructor and Description |
---|
AR1Variate()
Creates new AR1Variate with a normal(0,1) noiseGenerator distribution.
|
Modifier and Type | Method and Description |
---|---|
double |
generate()
Generate the next value.
|
double |
getAlpha() |
double |
getInitialValue() |
double |
getLastValue() |
double |
getNoiseVariance() |
java.lang.Object[] |
getParameters()
Returns the current value of the parameters as an array of Objects.
|
void |
setAlpha(double alpha) |
void |
setInitialValue(double initialValue) |
void |
setNoiseVariance(double noiseVariance) |
void |
setParameters(java.lang.Object... params)
Sets the random variate's parameters.
|
java.lang.String |
toString() |
getRandomNumber, setRandomNumber
protected double lastValue
private double alpha
private double noiseVariance
private double initialValue
private final RandomVariate noiseGenerator
public AR1Variate()
public java.lang.Object[] getParameters()
public void setParameters(java.lang.Object... params)
params
- The array of parameters, wrapped in objects.java.lang.IllegalArgumentException
- If the parameter array has
more than 2 elements. Note: If the array has no parameters, then
does nothing. If the array has 1 element, alpha is set and the current
value is unchanged. If the first parameter is not a
Number, then it is ignored.public double generate()
public void setAlpha(double alpha)
alpha
- the multiplication factor.public double getAlpha()
public double getLastValue()
public java.lang.String toString()
toString
in class java.lang.Object
public double getNoiseVariance()
public void setNoiseVariance(double noiseVariance)
public double getInitialValue()
public void setInitialValue(double initialValue)
initialValue
- the initialValue to set