@Override public boolean contains(int index) { return index < 0 || BitSet.this.get(index); }
@Override public boolean contains(long index) { return index < 0 || BitSet.this.get(index); }
@Override public boolean contains(int index) { return index < 0 || BitSet.this.get(index); }
@Override public boolean contains(long index) { return index < 0 || BitSet.this.get(index); }
private boolean accept(int source, int target, long edgeId) { if (!indices.containsKey(target)) { strongConnect(target); lowLink.put(source, Math.min(lowLink.get(source), lowLink.get(target))); } else if (onStack.get(target)) { lowLink.put(source, Math.min(lowLink.get(source), indices.get(target))); } return true; }
private boolean accept(int source, int target, long edgeId) { if (!indices.containsKey(target)) { strongConnect(target); lowLink.put(source, Math.min(lowLink.get(source), lowLink.get(target))); } else if (onStack.get(target)) { lowLink.put(source, Math.min(lowLink.get(source), indices.get(target))); } return true; }
/** * apply consumer to each connected community one time * * @param node node nodeId * @param consumer community nodeId consumer */ private void forEachConnectedCommunity(int node, IntConsumer consumer) { final BitSet visited = new BitSet(nodeCount); graph.forEachRelationship(node, D, (s, t, r) -> { final int c = localCommunities[t]; if (c == NONE) { return true; } if (visited.get(c)) { return true; } visited.set(c); consumer.accept(c); return true; }); }
/** * apply consumer to each connected community one time * * @param node node nodeId * @param consumer community nodeId consumer */ private void forEachConnectedCommunity(int node, IntConsumer consumer) { final BitSet visited = new BitSet(nodeCount); graph.forEachRelationship(node, D, (s, t, r) -> { final int c = localCommunities[t]; if (c == NONE) { return true; } if (visited.get(c)) { return true; } visited.set(c); consumer.accept(c); return true; }); }
private void run(int goal, Direction direction) { while (!queue.isEmpty() && running()) { int node = queue.pop(); if (node == goal) { return; } visited.set(node); double costs = this.costs.getOrDefault(node, Double.MAX_VALUE); graph.forEachRelationship( node, direction, (source, target, relId, weight) -> { boolean oldCostChanged = updateCosts(source, target, weight + costs); if (!visited.get(target)) { if (oldCostChanged) { queue.update(target); } else { queue.add(target, 0); } } return true; }); progressLogger.logProgress((double) node / (nodeCount - 1)); } }
if (!visited.get(t)) { switch (updateCosts) { case NO_PREVIOUS_COSTS:
if (!visited.get(t)) { depth[t] = d + 1; if (updateCosts) {
for (IntIntCursor it : stemToRowIndex) if (oneWordCandidateStemIndices.get(it.key))