Package org.neo4j.graphalgo.core.huge
Class GraphIntersect<CURSOR extends AdjacencyCursor>
- java.lang.Object
-
- org.neo4j.graphalgo.core.huge.GraphIntersect<CURSOR>
-
- All Implemented Interfaces:
RelationshipIntersect
- Direct Known Subclasses:
HugeGraphIntersect
public abstract class GraphIntersect<CURSOR extends AdjacencyCursor> extends java.lang.Object implements RelationshipIntersect
An instance of this is not thread-safe; Iteration/Intersection on multiple threads will throw misleadingNullPointerException
s. Instances are however safe to use concurrently with otherRelationshipIterator
s.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GraphIntersect(CURSOR cache, CURSOR cacheA, CURSOR cacheB, CURSOR empty, long maxDegree)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract long
advance(CURSOR cursor, long target)
Get the node id greater than or equal (>=) to the providedtarget
.protected abstract void
copyFrom(CURSOR sourceCursor, CURSOR targetCursor)
protected abstract CURSOR
cursor(long node, CURSOR reuse)
protected abstract int
degree(long node)
void
intersectAll(long nodeA, IntersectionConsumer consumer)
protected abstract long
skipUntil(CURSOR cursor, long target)
Get the node id strictly greater than (>) the providedtarget
.
-
-
-
Field Detail
-
empty
protected CURSOR extends AdjacencyCursor empty
-
-
Method Detail
-
intersectAll
public void intersectAll(long nodeA, IntersectionConsumer consumer)
- Specified by:
intersectAll
in interfaceRelationshipIntersect
-
skipUntil
protected abstract long skipUntil(CURSOR cursor, long target)
Get the node id strictly greater than (>) the providedtarget
. Might return an id that is less than or equal totarget
iff the cursor did exhaust before finding an id that is large enough.- Returns:
- the smallest node id in the cursor greater than the target.
-
advance
protected abstract long advance(CURSOR cursor, long target)
Get the node id greater than or equal (>=) to the providedtarget
. Might return an id that is less thantarget
iff the cursor did exhaust before finding an id that is large enough. Will always take at least one step.- Returns:
- the smallest node id in the cursor greater than or equal to the target.
-
degree
protected abstract int degree(long node)
-
-