Package org.neo4j.gds.api
Interface AdjacencyList
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
CompositeAdjacencyList
,CompressedAdjacencyList
,UncompressedAdjacencyList
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
, and thetarget ids
. 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.
-
-
Field Summary
Fields Modifier and Type Field Description static AdjacencyList
EMPTY
-
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.AdjacencyCursor
rawAdjacencyCursor()
Create a new uninitialized cursor.
-
-
-
Field Detail
-
EMPTY
static final AdjacencyList EMPTY
-
-
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.
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-