in graphjet-core/src/main/java/com/twitter/graphjet/algorithms/salsa/subgraph/SubgraphSalsa.java [60:83]
public SubgraphSalsa(
LeftIndexedBipartiteGraph bipartiteGraph,
int expectedNodesToHit,
int expectedNumLeftNodes,
StatsReceiver statsReceiver) {
SalsaSubgraphInternalState salsaSubgraphInternalState = new SalsaSubgraphInternalState(
bipartiteGraph,
new SalsaStats(),
expectedNodesToHit,
expectedNumLeftNodes);
this.salsaIterationsSubgraph = new SalsaIterations<LeftIndexedBipartiteGraph>(
salsaSubgraphInternalState,
new LeftSubgraphSalsaIteration(
salsaSubgraphInternalState,
new SalsaNodeVisitor.WeightedNodeVisitor(
salsaSubgraphInternalState.getVisitedRightNodes())),
new RightSubgraphSalsaIteration(salsaSubgraphInternalState),
new FinalSubgraphSalsaIteration(salsaSubgraphInternalState)
);
this.salsaSelectResultsSubgraph =
new SalsaSelectResults<LeftIndexedBipartiteGraph>(salsaSubgraphInternalState);
this.statsReceiver = statsReceiver.scope("SubgraphSALSA");
this.numRequestsCounter = this.statsReceiver.counter("numRequests");
}