Given a TypedPipe of edges, and a predicate for a smaller group (smallpred) of nodes and a bigger group (bigpred), compute the similarity between each item in the two sets The Edge.from nodes in the result will all satisfy smallpred, and the Edge.to will all satisfy bigpred.
Given a TypedPipe of edges, and a predicate for a smaller group (smallpred) of nodes and a bigger group (bigpred), compute the similarity between each item in the two sets The Edge.from nodes in the result will all satisfy smallpred, and the Edge.to will all satisfy bigpred. It is more efficient if you keep the smallpred set smaller.
This algothm is just matrix multiplication done by hand to make it clearer when we do the sampling implementation