jburkardt

ASA172\ Generation of all multi-indices in a given range {#asa172-generation-of-all-multi-indices-in-a-given-range align=”center”} ================================================


ASA172 is a C++ library which generates all multidimensional indices in a given range. simulating the behavior of an arbitrary number of nested loops, by OFlaherty and MacKenzie.

If the number of dimensions was known in advance, such an operation could be carried out by the corresponding set of nested loops. For example, in 3D:

        for ( i = i1; i <= i2; i++ )
          for ( j = j1: j <= j2; j2++ )
            for ( k = k1; k <= k2; k++ )
              (I,J,K) is an index in the range.

One feature of this library, though, is that it can generate all such indexes for an arbitrary number of dimensions.

ASA172 is Applied Statistics Algorithm 172. Source code for many Applied Statistics Algorithms is available through STATLIB.

Licensing: {#licensing align=”center”}

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages: {#languages align=”center”}

ASA172 is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

SUBSET, a C++ library which enumerates combinations, partitions, subsets, index sets, trees, and other combinatorial objects.

Author: {#author align=”center”}

Original FORTRAN77 version by M OFlaherty, G MacKenzie; C++ version by John Burkardt.

Reference: {#reference align=”center”}

  1. M OFlaherty, G MacKenzie,\ Algorithm AS 172: Direct Simulation of Nested Fortran DO-LOOPS,\ Applied Statistics,\ Volume 31, Number 1, 1982, pages 71-74.

Source Code: {#source-code align=”center”}

Examples and Tests: {#examples-and-tests align=”center”}

List of Routines: {#list-of-routines align=”center”}

You can go up one level to the C++ source codes.


Last revised on 27 July 2008.