Hi,
I'm struggling with the following problem:
1.
I have a node A that is connected with some nodes B1,B2,B3 and then I have some other nodes C, D, E that are connected to some nodes Bx (x = 1,2,3,...).
So A can be connected to some of the other nodes C,D,E through a subset of B1,B2,B3. I'd like to identify, for each node connected to A in this way, the subset of B nodes. Something like: C={B1,B3},D={B2},E={B1,B2}.
I spent a couple of days on that but I've not been able to obtain anything close to the expected result. Any help or suggestion will be very appreciated.
In addition to this I'm trying to solve the following point:
2.
I'd like to filter the above result keeping only the node connected to A through a specific subset of B nodes (e.g. only C={B1,B3},E={B1,B2} and not D as its connected only through B2).
I'm trying to solve this in Java, but also any help in Groovy with be much appreciated!
Thanks
Davide