Package org.neo4j.graphalgo.core.huge
Class TransientAdjacencyList
- java.lang.Object
-
- org.neo4j.graphalgo.core.huge.TransientAdjacencyList
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,AdjacencyList
public final class TransientAdjacencyList extends java.lang.Object implements AdjacencyList
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransientAdjacencyList.DecompressingCursor
-
Field Summary
Fields Modifier and Type Field Description static long
PAGE_MASK
static int
PAGE_SHIFT
static int
PAGE_SIZE
-
Constructor Summary
Constructors Constructor Description TransientAdjacencyList(byte[][] pages, HugeIntArray degrees, HugeLongArray offsets)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AdjacencyCursor
adjacencyCursor(long node, double fallbackValue)
Create a new cursor for the target ids of the givennode
.AdjacencyCursor
adjacencyCursor(@Nullable AdjacencyCursor reuse, long node, double fallbackValue)
Create a new cursor for the target ids of the givennode
.void
close()
static MemoryEstimation
compressedMemoryEstimation(boolean undirected)
static MemoryEstimation
compressedMemoryEstimation(long avgDegree, long nodeCount)
static MemoryEstimation
compressedMemoryEstimation(RelationshipType relationshipType, boolean undirected)
int
degree(long node)
Returns the degree of a node.PropertyCursor
propertyCursor(long node, double fallbackValue)
Create a new cursor for the properties of the relationships of a givennode
.PropertyCursor
propertyCursor(PropertyCursor reuse, long node, double fallbackValue)
Create a new cursor for the properties of the relationships of a givennode
.AdjacencyCursor
rawAdjacencyCursor()
Create a new uninitialized cursor.static MemoryEstimation
uncompressedMemoryEstimation(boolean undirected)
static MemoryEstimation
uncompressedMemoryEstimation(RelationshipType relationshipType, boolean undirected)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neo4j.graphalgo.api.AdjacencyList
adjacencyCursor, adjacencyCursor, propertyCursor, propertyCursor
-
-
-
-
Field Detail
-
PAGE_SHIFT
public static final int PAGE_SHIFT
- See Also:
- Constant Field Values
-
PAGE_SIZE
public static final int PAGE_SIZE
- See Also:
- Constant Field Values
-
PAGE_MASK
public static final long PAGE_MASK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransientAdjacencyList
public TransientAdjacencyList(byte[][] pages, HugeIntArray degrees, HugeLongArray offsets)
-
-
Method Detail
-
compressedMemoryEstimation
public static MemoryEstimation compressedMemoryEstimation(RelationshipType relationshipType, boolean undirected)
-
compressedMemoryEstimation
public static MemoryEstimation compressedMemoryEstimation(long avgDegree, long nodeCount)
-
compressedMemoryEstimation
@TestOnly public static MemoryEstimation compressedMemoryEstimation(boolean undirected)
-
uncompressedMemoryEstimation
public static MemoryEstimation uncompressedMemoryEstimation(RelationshipType relationshipType, boolean undirected)
-
uncompressedMemoryEstimation
@TestOnly public static MemoryEstimation uncompressedMemoryEstimation(boolean undirected)
-
close
public void close()
- Specified by:
close
in interfaceAdjacencyList
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
degree
public int degree(long node)
Description copied from interface:AdjacencyList
Returns the degree of a node. Undefined behavior if the node does not exist.- Specified by:
degree
in interfaceAdjacencyList
-
adjacencyCursor
public AdjacencyCursor adjacencyCursor(long node, double fallbackValue)
Description copied from interface:AdjacencyList
Create a new cursor for the target ids of the givennode
. If the cursor cannot produce property values, it will yield the providedfallbackValue
. NOTE: Whether and howAdjacencyCursor
s will return properties is unclear. Undefined behavior if the node does not exist.- Specified by:
adjacencyCursor
in interfaceAdjacencyList
-
adjacencyCursor
public AdjacencyCursor adjacencyCursor(@Nullable @Nullable AdjacencyCursor reuse, long node, double fallbackValue)
Description copied from interface:AdjacencyList
Create a new cursor for the target ids of the givennode
. If the cursor cannot produce property values, it will yield the providedfallbackValue
. NOTE: Whether and howAdjacencyCursor
s will return properties is unclear. The implementation might try to reuse the providedreuse
cursor, if possible. That is not guaranteed, however, implementation may choose to ignore the reuse cursor for any reason. Undefined behavior if the node does not exist.- Specified by:
adjacencyCursor
in interfaceAdjacencyList
-
rawAdjacencyCursor
public AdjacencyCursor rawAdjacencyCursor()
Description copied from interface:AdjacencyList
Create a new uninitialized cursor. NOTE: In order to use the returned cursorAdjacencyCursor.init(long, int)
must be called.- Specified by:
rawAdjacencyCursor
in interfaceAdjacencyList
-
propertyCursor
public PropertyCursor propertyCursor(long node, double fallbackValue)
Description copied from interface:AdjacencyList
Create a new cursor for the properties of the relationships of a givennode
. If the cursor cannot produce property values, it will yield the providedfallbackValue
. NOTE: Fallback behavior is not widely available and will be part of the next episode. Undefined behavior if the node does not exist.- Specified by:
propertyCursor
in interfaceAdjacencyList
-
propertyCursor
public PropertyCursor propertyCursor(PropertyCursor reuse, long node, double fallbackValue)
Description copied from interface:AdjacencyList
Create a new cursor for the properties of the relationships of a givennode
. If the cursor cannot produce property values, it will yield the providedfallbackValue
. NOTE: Fallback behavior is not widely available and will be part of the next episode. The implementation might try to reuse the providedreuse
cursor, if possible. That is not guaranteed, however, implementation may choose to ignore the reuse cursor for any reason. Undefined behavior if the node does not exist.- Specified by:
propertyCursor
in interfaceAdjacencyList
-
-