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
,FilteredLabeledIdMap
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 LabelInformation
labelInformation
-
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)
void
forEachNode(java.util.function.LongPredicate consumer)
Iterate over each nodeIdvoid
forEachNodeLabel(long mappedNodeId, IdMap.NodeLabelConsumer consumer)
boolean
hasLabel(long mappedNodeId, org.neo4j.gds.NodeLabel label)
LabelInformation
labelInformation()
long
nodeCount()
Number of mapped nodeIds.long
nodeCount(org.neo4j.gds.NodeLabel nodeLabel)
Number of mapped nodeIds for a specific node label.java.util.PrimitiveIterator.OfLong
nodeIterator()
java.util.PrimitiveIterator.OfLong
nodeIterator(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, highestOriginalId, 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
-
labelInformation
public LabelInformation labelInformation()
-
nodeCount
public long nodeCount()
Description copied from interface:IdMap
Number of mapped nodeIds.
-
nodeCount
public long nodeCount(org.neo4j.gds.NodeLabel nodeLabel)
Description copied from interface:IdMap
Number of mapped nodeIds for a specific node label.
-
forEachNode
public void forEachNode(java.util.function.LongPredicate consumer)
Description copied from interface:NodeIterator
Iterate over each nodeId- Specified by:
forEachNode
in interfaceNodeIterator
-
nodeIterator
public java.util.PrimitiveIterator.OfLong nodeIterator()
- Specified by:
nodeIterator
in interfaceNodeIterator
-
nodeIterator
public java.util.PrimitiveIterator.OfLong nodeIterator(java.util.Set<org.neo4j.gds.NodeLabel> labels)
- Specified by:
nodeIterator
in interfaceNodeIterator
-
batchIterables
public java.util.Collection<PrimitiveLongIterable> batchIterables(long batchSize)
- Specified by:
batchIterables
in 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:
availableNodeLabels
in interfaceIdMap
-
nodeLabels
public java.util.List<org.neo4j.gds.NodeLabel> nodeLabels(long mappedNodeId)
- Specified by:
nodeLabels
in interfaceIdMap
-
forEachNodeLabel
public void forEachNodeLabel(long mappedNodeId, IdMap.NodeLabelConsumer consumer)
- Specified by:
forEachNodeLabel
in interfaceIdMap
-
-