Documentation of 'umontreal.iro.lecuyer.hups.Rank1Lattice' Java class
Rank1Lattice
umontreal.iro.lecuyer.hups

Class Rank1Lattice

  • Direct Known Subclasses:
    KorobovLattice


    public class Rank1Lattice
    extends PointSet
    This class implements point sets defined by integration lattices of rank 1, defined as follows. One selects an arbitrary positive integer n and a s-dimensional integer vector (a0,..., as-1), where 0 <= aj < n for each j. Usually, a0 = 1. The points are defined by

    ui = (i/n)(a0, a1,…, as-1) mod 1

    for i = 0,..., n - 1. These n points are distinct provided that n and the aj's have no common factor.
    • Constructor Detail

      • Rank1Lattice

        public Rank1Lattice(int n,
                            int[] a,
                            int s)
        Instantiates a Rank1Lattice with n points and lattice vector a of dimension s.
        Parameters:
        n - there are n points
        a - the lattice vector
        s - dimension of the lattice vector a
    • Method Detail

      • getAs

        public int[] getAs()
        Returns the generator aj of the lattice. Its components are returned as a[j], for j = 0, 1,…,(s - 1).
      • addRandomShift

        public void addRandomShift(int d1,
                                   int d2,
                                   RandomStream stream)
        Adds a random shift to all the points of the point set, using stream stream to generate the random numbers. For each coordinate j from d1 to d2-1, the shift dj is generated uniformly over [0, 1) and added modulo 1 to all the coordinates of all the points.
        Overrides:
        addRandomShift in class PointSet
        Parameters:
        d1 - lower dimension of shift
        d2 - upper dimension of shift is d2 - 1
        stream - random number stream used to generate uniforms
      • clearRandomShift

        public void clearRandomShift()
        Clears the random shift.
        Overrides:
        clearRandomShift in class PointSet
      • toString

        public java.lang.String toString()
        Description copied from class: PointSet
        Formats a string that contains information about the point set.
        Overrides:
        toString in class PointSet
        Returns:
        string representation of the point set information
      • getCoordinate

        public double getCoordinate(int i,
                                    int j)
        Description copied from class: PointSet
        Returns ui, j, the coordinate j of the point i.
        Specified by:
        getCoordinate in class PointSet
        Parameters:
        i - index of the point to look for
        j - index of the coordinate to look for
        Returns:
        the value of ui, j
      • iterator

        public PointSetIterator iterator()
        Description copied from class: PointSet
        Constructs and returns a point set iterator. The default implementation returns an iterator that uses the method getCoordinate (i,j) to iterate over the points and coordinates, but subclasses can reimplement it for better efficiency.
        Overrides:
        iterator in class PointSet
        Returns:
        point set iterator for the point set

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.