Package org.neo4j.gds.api
Interface CompositeRelationshipIterator
-
- All Known Implementing Classes:
CSRCompositeRelationshipIterator
public interface CompositeRelationshipIterator
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CompositeRelationshipIterator.RelationshipConsumer
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompositeRelationshipIterator
concurrentCopy()
Creates a thread-safe copy of the iterator.int
degree(long nodeId)
Returns the degree of the given node id.void
forEachInverseRelationship(long nodeId, CompositeRelationshipIterator.RelationshipConsumer consumer)
Calls the given consumer for every inverse relationship of a given node.void
forEachRelationship(long nodeId, CompositeRelationshipIterator.RelationshipConsumer consumer)
Applies the given consumer on all relationships of the given node id.java.lang.String[]
propertyKeys()
Returns the property keys that are managed by this iterator.
-
-
-
Method Detail
-
degree
int degree(long nodeId)
Returns the degree of the given node id.
-
forEachRelationship
void forEachRelationship(long nodeId, CompositeRelationshipIterator.RelationshipConsumer consumer)
Applies the given consumer on all relationships of the given node id.
-
forEachInverseRelationship
void forEachInverseRelationship(long nodeId, CompositeRelationshipIterator.RelationshipConsumer consumer)
Calls the given consumer for every inverse relationship of a given node. Inverse relationships basically mirror the relationships in the iterator. For example, if `forEachRelationship(42)` returns `1337` then the result of `forEachInverseRelationship(1337)` contains `42. For undirected relationships, accessing the inverse is never supported.Note, that the inverse index might not always be present. Check
GraphStore.inverseIndexedRelationshipTypes()
before calling this method to verify that the relevant relationship type is inverse indexed.- Parameters:
nodeId
- the node for which to iterate the inverse relationshipsconsumer
- relationship consumer function
-
propertyKeys
java.lang.String[] propertyKeys()
Returns the property keys that are managed by this iterator. The order is equivalent to the order of the value array inCompositeRelationshipIterator.RelationshipConsumer.consume(long, long, double[])
.
-
concurrentCopy
CompositeRelationshipIterator concurrentCopy()
Creates a thread-safe copy of the iterator.
-
-