Package org.neo4j.graphalgo.api
Interface AdjacencyList
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
CompositeAdjacencyList
,TransientAdjacencyList
public interface AdjacencyList extends java.lang.AutoCloseable
The adjacency list for a mono-partite graph with an optional single relationship property. Provides access to thedegree
, thetarget ids
, andproperties
for any given source node. The methods in here are not final and may be revised under the continuation of Adjacency Compression III – Return of the Iterator One particular change could be that properties will be returned fromAdjacencyCursor
s instead from separatePropertyCursor
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AdjacencyCursor
adjacencyCursor(long node)
Create a new cursor for the target ids of the givennode
.AdjacencyCursor
adjacencyCursor(long node, double fallbackValue)
Create a new cursor for the target ids of the givennode
.default AdjacencyCursor
adjacencyCursor(@Nullable AdjacencyCursor reuse, long node)
Create a new cursor for the target ids of the givennode
.default AdjacencyCursor
adjacencyCursor(@Nullable AdjacencyCursor reuse, long node, double fallbackValue)
Create a new cursor for the target ids of the givennode
.void
close()
int
degree(long node)
Returns the degree of a node.default PropertyCursor
propertyCursor(long node)
Create a new cursor for the properties of the relationships of a givennode
.PropertyCursor
propertyCursor(long node, double fallbackValue)
Create a new cursor for the properties of the relationships of a givennode
.default PropertyCursor
propertyCursor(PropertyCursor reuse, long node)
Create a new cursor for the properties of the relationships of a givennode
.default 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.
-
-
-
Method Detail
-
degree
int degree(long node)
Returns the degree of a node. Undefined behavior if the node does not exist.
-
adjacencyCursor
default AdjacencyCursor adjacencyCursor(long node)
Create a new cursor for the target ids of the givennode
. The cursor is not expected to return correct property values. NOTE: Whether and howAdjacencyCursor
s will return properties is unclear. Undefined behavior if the node does not exist.
-
adjacencyCursor
AdjacencyCursor adjacencyCursor(long node, double fallbackValue)
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.
-
adjacencyCursor
default AdjacencyCursor adjacencyCursor(@Nullable @Nullable AdjacencyCursor reuse, long node)
Create a new cursor for the target ids of the givennode
. The cursor is not expected to return correct property values. 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.
-
adjacencyCursor
default AdjacencyCursor adjacencyCursor(@Nullable @Nullable AdjacencyCursor reuse, long node, double fallbackValue)
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.
-
rawAdjacencyCursor
AdjacencyCursor rawAdjacencyCursor()
Create a new uninitialized cursor. NOTE: In order to use the returned cursorAdjacencyCursor.init(long, int)
must be called.
-
propertyCursor
default PropertyCursor propertyCursor(long node)
Create a new cursor for the properties of the relationships of a givennode
. The cursor is expected to produce property values. Undefined behavior if the node does not exist. Undefined behavior if this list does not have properties.
-
propertyCursor
PropertyCursor propertyCursor(long node, double fallbackValue)
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.
-
propertyCursor
default PropertyCursor propertyCursor(PropertyCursor reuse, long node)
Create a new cursor for the properties of the relationships of a givennode
. The cursor is expected to produce property values. 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. Undefined behavior if this list does not have properties.
-
propertyCursor
default PropertyCursor propertyCursor(PropertyCursor reuse, long node, double fallbackValue)
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.
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-