GAP Project repository
  

Iterators and Enumerators

Need:
4
Time:
3
Contact: Frank Lübeck
( Frank.Luebeck@Math.RWTH-Aachen.De)
Last Update: 2002/3/30
Math:
3
Program:
3


Description

There are applications of combinatorial objects in GAP which quickly lead to memory problems. In a certain range of problem size the main difficulty is tha\ t one wants to loop over certain objects (subsets of a set, partitions of a number, ...) and that the list of these objects needs too much memory (while loop lengths of several billions may not be a problem with todays fast computers). The solution is to use iterators which allow to produce one object of the list after the other without creating a list of all objects.

There are also problems where a numbering of a set of certain objects is useful. In some cases one can construct enumerators which behave like a list of objects, but which need only little memory.

It would be nice to have many interesting sets or lists of combinatorial objects available as efficiently implemented iterators and/or enumerators in GAP . (For example, currently one can loop over many types of groups without generating a list of all elements.)

The mathematical and programming difficulty of implementing iterators and enumerators (they are probably often more difficult) will vary a lot between different kinds of objects.

References

depends on the considered objects

Usage

see Sections on Iterators and Enumerators and study the (too few) examples in the current library.

GAP home page