Package org.neo4j.gds.api
Class LabeledIdMap
- java.lang.Object
-
- org.neo4j.gds.api.LabeledIdMap
-
- All Implemented Interfaces:
BatchNodeIterable,IdMap,NodeIterator,PartialIdMap
- Direct Known Subclasses:
ArrayIdMap
public abstract class LabeledIdMap extends java.lang.Object implements IdMap
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.neo4j.gds.api.BatchNodeIterable
BatchNodeIterable.BitSetIdIterator, BatchNodeIterable.IdIterable, BatchNodeIterable.IdIterator
-
Nested classes/interfaces inherited from interface org.neo4j.gds.api.IdMap
IdMap.NodeLabelConsumer
-
-
Field Summary
Fields Modifier and Type Field Description protected LabelInformationlabelInformation-
Fields inherited from interface org.neo4j.gds.api.IdMap
NOT_FOUND, START_NODE_ID
-
-
Constructor Summary
Constructors Constructor Description LabeledIdMap(LabelInformation labelInformation, long nodeCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.neo4j.gds.NodeLabel>availableNodeLabels()java.util.Collection<PrimitiveLongIterable>batchIterables(long batchSize)voidforEachNode(java.util.function.LongPredicate consumer)Iterate over each nodeIdvoidforEachNodeLabel(long mappedNodeId, IdMap.NodeLabelConsumer consumer)booleanhasLabel(long mappedNodeId, org.neo4j.gds.NodeLabel label)longnodeCount()Number of mapped nodeIds.java.util.PrimitiveIterator.OfLongnodeIterator()java.util.PrimitiveIterator.OfLongnodeIterator(java.util.Set<org.neo4j.gds.NodeLabel> labels)java.util.List<org.neo4j.gds.NodeLabel>nodeLabels(long mappedNodeId)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neo4j.gds.api.IdMap
contains, highestNeoId, rootIdMap, safeToMappedNodeId, toOriginalNodeId, toRootNodeId, withFilteredLabels
-
Methods inherited from interface org.neo4j.gds.api.PartialIdMap
rootNodeCount, toMappedNodeId
-
-
-
-
Field Detail
-
labelInformation
protected final LabelInformation labelInformation
-
-
Constructor Detail
-
LabeledIdMap
public LabeledIdMap(LabelInformation labelInformation, long nodeCount)
-
-
Method Detail
-
nodeCount
public long nodeCount()
Description copied from interface:IdMapNumber of mapped nodeIds.
-
forEachNode
public void forEachNode(java.util.function.LongPredicate consumer)
Description copied from interface:NodeIteratorIterate over each nodeId- Specified by:
forEachNodein interfaceNodeIterator
-
nodeIterator
public java.util.PrimitiveIterator.OfLong nodeIterator()
- Specified by:
nodeIteratorin interfaceNodeIterator
-
nodeIterator
public java.util.PrimitiveIterator.OfLong nodeIterator(java.util.Set<org.neo4j.gds.NodeLabel> labels)
- Specified by:
nodeIteratorin interfaceNodeIterator
-
batchIterables
public java.util.Collection<PrimitiveLongIterable> batchIterables(long batchSize)
- Specified by:
batchIterablesin interfaceBatchNodeIterable- Returns:
- a collection of iterables over every node, partitioned by the given batch size.
-
availableNodeLabels
public java.util.Set<org.neo4j.gds.NodeLabel> availableNodeLabels()
- Specified by:
availableNodeLabelsin interfaceIdMap
-
nodeLabels
public java.util.List<org.neo4j.gds.NodeLabel> nodeLabels(long mappedNodeId)
- Specified by:
nodeLabelsin interfaceIdMap
-
forEachNodeLabel
public void forEachNodeLabel(long mappedNodeId, IdMap.NodeLabelConsumer consumer)- Specified by:
forEachNodeLabelin interfaceIdMap
-
-