Javadoc
Maps the distribution of an R-group to all possible substitute combinations.
This is best illustrated by an example.
Say R2 occurs twice in the root, and has condition >0. So a valid
output configuration can have either one or two substitutes.
The distributions will have been calculated to be the following
solutions: [0,1], [1,0], [1,1]
To start with [1,1], assume two possible substitutes have been
defined for R2, namely *C=O and *C-N. Then the distribution [1,1]
should lead to four mappings:
[*C=O,*C=O], [*C-N,*C-N], [*C=O,*C-N], [*C-N,*C=O].
These mappings are generated in this function, as well as the other valid mappings
for [0,1] and [1,0]:
[*C=O,null], [*C-N,null], [null,*C=O], [null,*C-N].
So the example would have this function produce eight mappings (result list size==8).