SimJava
v2.0

eduni.simjava.distributions
Class Sim_f_obj

java.lang.Object
  |
  +--eduni.simjava.distributions.Sim_f_obj
All Implemented Interfaces:
ContinuousGenerator, Generator

public class Sim_f_obj
extends java.lang.Object
implements ContinuousGenerator

A random number generator based on the F-distribution.


Constructor Summary
Sim_f_obj(java.lang.String name, long num_deg_freedom, long den_deg_freedom)
          Constructor with which Sim_system is allowed to set the random number generator's seed
Sim_f_obj(java.lang.String name, long num_deg_freedom, long den_deg_freedom, long seed)
          The constructor with which a specific seed is set for the random number generator
 
Method Summary
 java.lang.String get_name()
          Get the random number generator's name.
 long get_seed()
          Get the random number generator's seed.
 double sample()
          Generate a new random number.
 void set_seed(long seed)
          Set the random number generator's seed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sim_f_obj

public Sim_f_obj(java.lang.String name,
                 long num_deg_freedom,
                 long den_deg_freedom)
Constructor with which Sim_system is allowed to set the random number generator's seed
Parameters:
name - The name to be associated with this instance
num_deg_freedom - The numerator degrees of freedom for the distribution
den_deg_freedom - The denominator degrees of freedom for the distribution

Sim_f_obj

public Sim_f_obj(java.lang.String name,
                 long num_deg_freedom,
                 long den_deg_freedom,
                 long seed)
The constructor with which a specific seed is set for the random number generator
Parameters:
name - The name to be associated with this instance
num_deg_freedom - The numerator degrees of freedom for the distribution
den_deg_freedom - The denominator degrees of freedom for the distribution
seed - The initial seed for the generator, two instances with the same seed will generate the same sequence of numbers
Method Detail

sample

public double sample()
Generate a new random number.
Specified by:
sample in interface ContinuousGenerator
Returns:
The next random number in the sequence

set_seed

public void set_seed(long seed)
Set the random number generator's seed.
Specified by:
set_seed in interface Generator
Parameters:
seed - The new seed for the generator

get_seed

public long get_seed()
Get the random number generator's seed.
Specified by:
get_seed in interface Generator
Returns:
The generator's seed

get_name

public java.lang.String get_name()
Get the random number generator's name.
Specified by:
get_name in interface Generator
Returns:
The generator's name

SimJava
v2.0

The University of Edinburgh, 2002