Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1597

Refactor low-discrepancy sequence functionality

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 4.X
    • None
    • None

    Description

      Two low-discrepancy sequences are implemented in Commons Math (in package o.a.c.math4.legacy.random:

      • SobolSequenceGenerator
      • HaltonSequenceGenerator

      They both provide several methods:

      • nextVector()
      • skipTo(int)
      • getNextIndex()

      of which only the first is part of their common API through the RandomVectorGenerator.

      I propose to create an interface that would better represent the specific concept (and avoid the confusion with pseudo-random generators):

      public interface LowDiscrepancySequence extends Supplier<double[]> { /* ... */}
      

      Thus, instead of class SobolSequenceGenerator we'd have:

      public class SobolSequence implements LowDiscrepancySequence {
          // ...
      }
      

      This functionality could be moved to a new o.a.c.m.legacy.quasirandom package .

      Method skipTo could be replaced with an API similar to Commons RNG JumpableUniformRandomProvider .

      The new design (TBD on the "dev" ML) should ideally take additional implementations into account.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              erans Gilles Sadowski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h