package umontreal.iro.lecuyer.hups;
/* *
* Title:
* Description:
* Copyright: Copyright (c)
* Company:
* @author
* @version 1.0
*/
import umontreal.iro.lecuyer.util.PrintfFormat;
/**
* This class implements a digital net in base 2 starting from a
* polynomial LCG in
* F2w[z]/P(z).
* It is exactly the same
* point set as the one defined in the class
* {@link umontreal.iro.lecuyer.hups.F2wCycleBasedPolyLCG F2wCycleBasedPolyLCG}.
* See the description
* of this class for more details on the way the point set is constructed.
*
*
* Constructing a point set using this class, instead of using
* {@link umontreal.iro.lecuyer.hups.F2wCycleBasedPolyLCG F2wCycleBasedPolyLCG},
* makes SSJ construct a digital net in base 2. This is useful if one
* wants to randomize using one of the randomizations included in the class
* {@link umontreal.iro.lecuyer.hups.DigitalNet DigitalNet}.
*
*
* Note: This class in not operational yet!
*
*/
public class F2wNetPolyLCG extends DigitalNetBase2
{
private F2wStructure param;
/* *
* Constructs and stores the set of cycles for an LCG with
* modulus n and multiplier a.
* If pgcd(a, n) = 1, this constructs a full-period LCG which has two
* cycles, one containing 0 and one, the LCG period.
*
* @param n required number of points and modulo of the LCG
*
* @param a generator a of the LCG
*
*
*/
/**
* Constructs a point set with 2rw points. See the description of the class
* {@link umontreal.iro.lecuyer.hups.F2wStructure F2wStructure} for the meaning of the
* parameters.
*
*/
public F2wNetPolyLCG (int type, int w, int r, int modQ, int step,
int nbcoeff, int coeff[], int nocoeff[], int dim)
{
param = new F2wStructure (w, r, modQ, step, nbcoeff, coeff, nocoeff);
initNet (r, w, dim);
}
/**
* Constructs a point set after reading its parameters from
* file filename; the parameters are located at line numbered no
* of filename. The available files are listed in the description of class
* {@link umontreal.iro.lecuyer.hups.F2wStructure F2wStructure}.
*
*/
public F2wNetPolyLCG (String filename, int no, int dim)
{
param = new F2wStructure (filename, no);
initNet (param.r, param.w, dim);
}
public String toString ()
{
String s = "F2wNetPolyLCG:" + PrintfFormat.NEWLINE;
return s + param.toString ();
}
private void initNet (int r, int w, int dim)
{
normFactor = param.normFactor;
}
}
Ads help maintain this website.