SSJ
V. labo.

umontreal.iro.lecuyer.hups
Class CycleBasedLFSR

java.lang.Object
  extended by umontreal.iro.lecuyer.hups.PointSet
      extended by umontreal.iro.lecuyer.hups.CycleBasedPointSet
          extended by umontreal.iro.lecuyer.hups.CycleBasedPointSetBase2
              extended by umontreal.iro.lecuyer.hups.CycleBasedLFSR

public class CycleBasedLFSR
extends CycleBasedPointSetBase2

CycleBasedLFSR

LFSR generators produce numbers by generating a sequence of bits from a linear recurrence modulo 2, and forming fractional numbers by taking blocks of successive bits. More precisely, let F2 denote the finite field with two elements (say, 0 and 1). Let P(z) = zk - a1zk-1 - ... - ak be a polynomial with coefficients in F2, and consider the recurrence

xn = a1xn-1 + ... + akxn-k,

whose characteristic polynomial is P(z). It should be understood that in all computations are performed in F2 (this can be identified with working in integer arithmetic modulo 2). Suppose that s0 = (x0,..., xk-1)∈{0, 1}k is fixed and define

un = $\displaystyle \htsum_{{i=1}}^{L}$xns+i-12-i,

where s and L are positive integers. If P is primitive, s0 $ \not=$ 0, and ρ = 2k - 1 is coprime to s, then the sequences and are both purely periodic with period ρ. Computing un from un-1 involves performing s steps of the recurrence.

Suppose now that we have J LFSR recurrences, the j-th one having a primitive characteristic polynomial Pj(z) of degree kj, and step size sj. Let {xj, nn≥0} be the j-th LFSR sequence, and define xn = (x1, n + ... + xJ, n)mod 2 and un as in. Equivalently, if {uj, nn≥0} is the output sequence from the j-th LFSR, then un = u1, n ... uJ, n where denotes the bitwise exclusive-or in the binary expansion. The sequence {xn} is called the combined LFSR sequence and a generator that produces this {un} is called a combined LFSR generator.


Nested Class Summary
 
Nested classes/interfaces inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSetBase2
CycleBasedPointSetBase2.CycleBasedPointSetBase2Iterator
 
Nested classes/interfaces inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
CycleBasedPointSet.CycleBasedPointSetIterator
 
Constructor Summary
CycleBasedLFSR(int step1, int nbcoeff1, int[] nocoeff1)
          .
CycleBasedLFSR(int step1, int step2, int nbcoeff1, int nbcoeff2, int[] nocoeff1, int[] nocoeff2)
          .
CycleBasedLFSR(String filename, int no)
          .
 
Method Summary
 String toString()
          .
 
Methods inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSetBase2
addRandomShift, clearRandomShift, formatPoints, getCoordinate, iterator
 
Methods inherited from class umontreal.iro.lecuyer.hups.CycleBasedPointSet
getDimension
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CycleBasedLFSR

public CycleBasedLFSR(int step1,
                      int nbcoeff1,
                      int[] nocoeff1)
. \begin{tabb}
 Constructs a point set based on a polynomial in base 2 with $2^{k_...
 ...$k_1$\ = 9,
 \texttt{nbcoeff1} = 3, \texttt{nocoeff1} = \{9, 4, 0\}.
 \end{tabb}


CycleBasedLFSR

public CycleBasedLFSR(int step1,
                      int step2,
                      int nbcoeff1,
                      int nbcoeff2,
                      int[] nocoeff1,
                      int[] nocoeff2)
. \begin{tabb}
 Constructs a point set based on a combination of two polynomials i...
 ...ing of the parameters is the
 same as in the case of one polynomial.
 \end{tabb}


CycleBasedLFSR

public CycleBasedLFSR(String filename,
                      int no)
. \begin{tabb}
 Constructs a point set after reading its parameters from
 file \te...
 ... 6 \\
 \texttt{j2\_k19.dat} & 4 \\
 \hline
 \end {tabular}
 \end{center}\end{tabb}

Method Detail

toString

public String toString()
Description copied from class: PointSet
. \begin{tabb}
 Formats a string that contains information about the point set.
 \end{tabb}
string representation of the point set information

Overrides:
toString in class CycleBasedPointSet

SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.