Re:So you want to build a generator (programming)
by sidpatil on Tuesday May 25, 2021 @11:58AM
(#27278504)
From the title, I thought it would be about these generators: https://en.wikipedia.org/wiki/Generator_(computer_programmin...
[ Parent
| on HN ]
Re:So you want to build a generator (programming)
by gilleain on Tuesday May 25, 2021 @06:45PM
(#27283736)
Generation with constraints is a fairly common algorithm in combinatorics.
When you need a set of objects with a particular structure, you could just make all possible examples and then filter out the unsuitable ones.
However if there are too many objects (matricies, graphs, etc) then this is inefficient. It is better to constrain the generation so that you 'prune' the tree of possible objects.