de.jstacs.utils.random
Class ErlangMRGParams

java.lang.Object
  extended by de.jstacs.utils.random.MRGParams
      extended by de.jstacs.utils.random.ErlangMRGParams

public class ErlangMRGParams
extends MRGParams

The container for parameters of an Erlang multivariate random generator.

Author:
Jens Keilwagen
See Also:
MRGParams

Constructor Summary
ErlangMRGParams(int[] alpha)
          Constructor which creates a new hyperparameter vector for an Erlang random generator.
ErlangMRGParams(int alpha, int n)
          Constructor which creates a new hyperparameter vector for an Erlang random generator.
 
Method Summary
 int getDimension()
          Returns the dimension of the hyperparameter vector of the underlying Erlang distribution.
 int getHyperparameter(int i)
          Returns the value at position i of the hyperparameter vector of the underlying Erlang distribution.
 int getSumOfHyperparameter()
          Returns the sum of the hyperparameters (entries of the hyperparameter vector) of the underlying Erlang distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErlangMRGParams

public ErlangMRGParams(int alpha,
                       int n)
                throws IllegalArgumentException
Constructor which creates a new hyperparameter vector for an Erlang random generator. The hyperparameter vector of the underlying Erlang distribution consists of the same value at every position.

Parameters:
alpha - the value for the hyperparameter vector
n - the dimension of the hyperparameter vector
Throws:
IllegalArgumentException - if n is chosen incorrectly (has to be greater than 2) or if alpha is chosen incorrectly (has to be positive)

ErlangMRGParams

public ErlangMRGParams(int[] alpha)
                throws IllegalArgumentException
Constructor which creates a new hyperparameter vector for an Erlang random generator.

Parameters:
alpha - the hyperparameter vector
Throws:
IllegalArgumentException - if at least one of the hyperparameters is not positive
Method Detail

getDimension

public int getDimension()
Returns the dimension of the hyperparameter vector of the underlying Erlang distribution.

Returns:
the dimension of the hyperparameter vector of the underlying Erlang distribution

getHyperparameter

public int getHyperparameter(int i)
Returns the value at position i of the hyperparameter vector of the underlying Erlang distribution.

Parameters:
i - the position of the hyperparameter vector
Returns:
the value at position i of the hyperparameter vector of the underlying Erlang distribution

getSumOfHyperparameter

public int getSumOfHyperparameter()
Returns the sum of the hyperparameters (entries of the hyperparameter vector) of the underlying Erlang distribution.

Returns:
the sum of the hyperparameters (entries of the hyperparameter vector) of the underlying Erlang distribution