lattice_rule
    
    
    
      lattice_rule,
      a MATLAB code which
      approximates integrals in multiple 
      dimensions using lattice rules.
    
    
      The lattice rules are defined on the unit square, or in higher
      dimensions, on the unit hypercube.  
    
    
      Lattice rules are more suitable to integrands that are periodic, 
      with period 1, in all variables.  However, there are techniques 
      that may be used when the integrand does not satisfy this requirement.
    
    
      The performance of a lattice rule depends heavily on the choice
      of the generator vectors.  Once the spatial dimension and the
      number of points have been chosen, there are techniques for 
      finding a good generator vector.
    
    
      The simplest lattice rules are called "rank 1" rules, and
      use a lattice generated by multiples of a single generator vector.
      More elaborate rules can be generated by using more generator vectors,
      up to the maximum, which is the dimension of the space.
    
    
      Licensing:
    
    
      The information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      lattice_rule is available in
      a C++ version and
      a Fortran90 version and
      a MATLAB version and
      an Octave version.
    
    
      Related Programs:
    
    
      
      lattice_rule_test
    
    
      
      matlab_rule,
      a MATLAB code which
      computes a quadrature rule which
      estimates the integral of a function f(x), which might be defined over 
      a one dimensional region (a line) or more complex shapes such as 
      a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional
      region, and which might include an associated weight function w(x).
    
    
      Reference:
    
    
      
        - 
          Seymour Haber,
          Parameters for Integrating Periodic Functions of 
          Several Variables,
          Mathematics of Computation,
          Volume 41, Number 163, July 1983, pages 115-129.
         
        - 
          Albert Nijenhuis, Herbert Wilf,
          Combinatorial Algorithms for Computers and Calculators,
          Second Edition,
          Academic Press, 1978,
          ISBN: 0-12-519260-6,
          LC: QA164.N54.
         
        - 
          Ian Sloan, Stephen Joe,
          Lattice Methods for Multiple Integration,
          Oxford University Press, 1994,
          ISBN: 0198534728,
          LC: QA311.S56
         
      
    
    
      Source Code:
    
    
      
        - 
          f2.m,
          evaluates a function of a scalar used in defining P2(Q).
        
 
        - 
          f20_s.m,
          evaluates a function of a vector used in defining P2(Q).
        
 
        - 
          fibonacci.m,
          returns the Fibonacci number of given index.
        
 
        - 
          fibonacci_lattice_b.m,
          applies an optimal Fibonacci lattice integration rule in 2D.
        
 
        - 
          fibonacci_lattice_q.m,
          applies a Fibonacci lattice integration rule in 2D.
        
 
        - 
          fibonacci_lattice_q_nodes.m,
          returns Fibonacci lattice nodes in 2D.
        
 
        - 
          fibonacci_lattice_q1.m,
          applies a Fibonacci lattice integration rule in 2D.
        
 
        - 
          fibonacci_lattice_q2.m,
          applies a Fibonacci lattice integration rule in 2D.
        
 
        - 
          fibonacci_lattice_q3.m,
          applies a Fibonacci lattice integration rule in 2D.
        
 
        - 
          fibonacci_lattice_t.m,
          applies a symmetric Fibonacci lattice integration rule in 2D.
        
 
        - 
          find_z20.m,
          finds the appropriate Z vector to minimize P2(QS).
        
 
        - 
          gray_next.m,
          generates the next Gray code by switching one item at a time.
        
 
        - 
          i4vec_print.m,
          prints an I4VEC.
        
 
        - 
          lattice.m,
          applies a lattice integration rule.
        
 
        - 
          lattice_np0.m,
          applies a lattice integration rule to a nonperiodic function.
        
 
        - 
          lattice_np1.m,
          applies a lattice integration rule to a nonperiodic function.
        
 
        - 
          lattice_print.m,
          prints the points in a lattice rule.
        
 
        - 
          monte_carlo.m,
          applies a Monte Carlo integration rule.
        
 
        - 
          prime.m,
          returns any of the first PRIME_MAX prime numbers.
        
 
        - 
          r8mat_transpose_print.m,
          prints a R8MAT, transposed.
        
 
        - 
          r8mat_transpose_print_some.m,
          prints some of a R8MAT, transposed.
        
 
        - 
          s_len_trim.m,
          returns the length of a string to the last nonblank.
        
 
        - 
          tuple_next.m,
          computes the next element of a tuple space.
        
 
      
    
    
    
      Last revised on 11 February 2019.