Package org.neo4j.gds.api
Interface RelationshipIterator
-
- All Superinterfaces:
RelationshipPredicate
- All Known Implementing Classes:
CSRGraphAdapter,GraphAdapter,HugeGraph,NodeFilteredGraph,UnionGraph
public interface RelationshipIterator extends RelationshipPredicate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RelationshipIteratorconcurrentCopy()voidforEachRelationship(long nodeId, double fallbackValue, RelationshipWithPropertyConsumer consumer)Calls the given consumer function for every relationship of a given node.voidforEachRelationship(long nodeId, RelationshipConsumer consumer)Calls the given consumer function for every relationship of a given node.java.util.stream.Stream<RelationshipCursor>streamRelationships(long nodeId, double fallbackValue)-
Methods inherited from interface org.neo4j.gds.api.RelationshipPredicate
exists
-
-
-
-
Method Detail
-
forEachRelationship
void forEachRelationship(long nodeId, RelationshipConsumer consumer)Calls the given consumer function for every relationship of a given node.- Parameters:
nodeId- id of the node for which to iterate relationshipsconsumer- relationship consumer function
-
forEachRelationship
void forEachRelationship(long nodeId, double fallbackValue, RelationshipWithPropertyConsumer consumer)Calls the given consumer function for every relationship of a given node. If the graph was loaded with a relationship property, the property value of the relationship will be passed into the consumer. Otherwise the given fallback value will be used.- Parameters:
nodeId- id of the node for which to iterate relationshipsfallbackValue- value used as relationship property if no properties were loadedconsumer- relationship consumer function
-
streamRelationships
java.util.stream.Stream<RelationshipCursor> streamRelationships(long nodeId, double fallbackValue)
-
concurrentCopy
default RelationshipIterator concurrentCopy()
- Returns:
- a copy of this iterator that reuses new cursors internally, so that iterations happen independent from other iterations.
-
-