net.sf.farrago.rng
Class FarragoRngUDR
java.lang.Object
net.sf.farrago.rng.FarragoRngUDR
public abstract class FarragoRngUDR
- extends Object
FarragoRngUDR contains implementations for the user-defined routine
portion of the RNG plugin example.
- Version:
- $Id: //open/dev/farrago/examples/rng/src/net/sf/farrago/rng/FarragoRngUDR.java#14 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tracer
private static final Logger tracer
FarragoRngUDR
public FarragoRngUDR()
rng_next_int
public static int rng_next_int(String rngName,
int n)
throws SQLException
- Generates the next pseudo-random integer from a particular RNG.
- Parameters:
rngName
- name of the RNG (possibly qualified)n
- upper limit on generated nonnegative integer, or -1 for
unlimited (including negative)
- Throws:
SQLException
rng_next_int_internal
public static int rng_next_int_internal(int n,
String rngName,
String filename)
throws SQLException
- Generates the next pseudo-random integer from a particular RNG.
- Parameters:
n
- upper limit on generated nonnegative integer, or -1 for
unlimited (including negative)rngName
- fully-qualified name of the RNGfilename
- name of the RNG's datafile
- Returns:
- psuedo-random integer
- Throws:
SQLException
getRngModelPackage
public static RngmodelPackage getRngModelPackage(FarragoRepos repos)
writeSerialized
public static void writeSerialized(File file,
Random random)
throws IOException
- Throws:
IOException
readSerialized
public static Random readSerialized(File file)
throws Exception
- Throws:
Exception
getFilename
static String getFilename(RngRandomNumberGenerator rng)