umontreal.iro.lecuyer.hups
Class LCGPointSet
- java.lang.Object
-
- umontreal.iro.lecuyer.hups.PointSet
-
- umontreal.iro.lecuyer.hups.CycleBasedPointSet
-
- umontreal.iro.lecuyer.hups.LCGPointSet
-
public class LCGPointSet extends CycleBasedPointSet
Implements a recurrence-based point set defined via a linear congruential recurrence of the form xi = axi-1mod n and ui = xi/n. The implementation is done by storing the values of ui over the set of all cycles of the recurrence.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
CycleBasedPointSet.CycleBasedPointSetIterator
-
-
Constructor Summary
Constructors Constructor and Description LCGPointSet(int n, int a)Constructs and stores the set of cycles for an LCG with modulus n and multiplier a.LCGPointSet(int b, int e, int c, int a)Constructs and stores the set of cycles for an LCG with modulus n = be + c and multiplier a.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgeta()Returns the value of the multiplier a.java.lang.StringtoString()Formats a string that contains information about the point set.-
Methods inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
addRandomShift, clearRandomShift, formatPoints, getCoordinate, getDimension, iterator
-
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
addRandomShift, addRandomShift, addRandomShift, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getNumPoints, getStream, randomize, randomize, randomize, randomize, randomize, setStream, unrandomize
-
-
-
-
Constructor Detail
-
LCGPointSet
public LCGPointSet(int n, int a)Constructs and stores the set of cycles for an LCG with modulus n and multiplier a. If the LCG has full period length n - 1, there are two cycles, the first one containing only 0 and the second one of period length n - 1.- Parameters:
n- required number of points and modulus of the LCGa- generator a of the LCG
-
LCGPointSet
public LCGPointSet(int b, int e, int c, int a)Constructs and stores the set of cycles for an LCG with modulus n = be + c and multiplier a.
-
-
Method Detail
-
toString
public java.lang.String toString()
Description copied from class:PointSetFormats a string that contains information about the point set.- Overrides:
toStringin classCycleBasedPointSet- Returns:
- string representation of the point set information
-
geta
public int geta()
Returns the value of the multiplier a.
-
-
DMelt 3.0 © DataMelt by jWork.ORG