HomeAbout

Combinator

From the site:

The usage of Combinator class is very simple. It takes the input array of items and defined size (combination number) of combination arrays that can be produced in a loop.
Suppose we need to generate all three-number combinations from numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. We put them in array, instantiate the Combinator and call its next() method in a loop until there are no combinations left.

http://lharp.net/post/array-combinator/

No Comments »

RSS feed for comments on this post. | TrackBack URI
You can also bookmark this on del.icio.us or check the cosmos

Leave a comment





XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .