olisemalis
MIS
Hi,
Im trying to make a virtual connection (link) between n elements/objects.
For instance, if I have 3 objects, I would like to create, one by one (because I need do execute a test on each new link), this links (exploring all possible links):
objects: a b c (3 objects)
Link1: no link
Link2: abc
Link3: ab (bc with no link)
Link4: ac (ab and bc with no link)
Link5: bc
Link6: ab + ac (bc with no link)
Link7: ac + bc (ab with no link)
Link8: ab + bc + ac (all connected)
Total links: will be 8
I´m trying this using recursive function, but I´m not getting the best results.
Any help?
Thank you
Im trying to make a virtual connection (link) between n elements/objects.
For instance, if I have 3 objects, I would like to create, one by one (because I need do execute a test on each new link), this links (exploring all possible links):
objects: a b c (3 objects)
Link1: no link
Link2: abc
Link3: ab (bc with no link)
Link4: ac (ab and bc with no link)
Link5: bc
Link6: ab + ac (bc with no link)
Link7: ac + bc (ab with no link)
Link8: ab + bc + ac (all connected)
Total links: will be 8
I´m trying this using recursive function, but I´m not getting the best results.
Any help?
Thank you