Class LabeledIdMap

    • Constructor Detail

      • LabeledIdMap

        public LabeledIdMap​(LabelInformation labelInformation,
                            long nodeCount)
    • Method Detail

      • nodeCount

        public long nodeCount()
        Description copied from interface: IdMap
        Number of mapped nodeIds.
        Specified by:
        nodeCount in interface IdMap
      • nodeCount

        public long nodeCount​(org.neo4j.gds.NodeLabel nodeLabel)
        Description copied from interface: IdMap
        Number of mapped nodeIds for a specific node label.
        Specified by:
        nodeCount in interface IdMap
      • forEachNode

        public void forEachNode​(java.util.function.LongPredicate consumer)
        Description copied from interface: NodeIterator
        Iterate over each nodeId
        Specified by:
        forEachNode in interface NodeIterator
      • nodeIterator

        public java.util.PrimitiveIterator.OfLong nodeIterator()
        Specified by:
        nodeIterator in interface NodeIterator
      • nodeIterator

        public java.util.PrimitiveIterator.OfLong nodeIterator​(java.util.Set<org.neo4j.gds.NodeLabel> labels)
        Specified by:
        nodeIterator in interface NodeIterator
      • batchIterables

        public java.util.Collection<org.neo4j.gds.collections.primitive.PrimitiveLongIterable> batchIterables​(long batchSize)
        Specified by:
        batchIterables in interface BatchNodeIterable
        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 interface IdMap
      • nodeLabels

        public java.util.List<org.neo4j.gds.NodeLabel> nodeLabels​(long mappedNodeId)
        Specified by:
        nodeLabels in interface IdMap
      • hasLabel

        public boolean hasLabel​(long mappedNodeId,
                                org.neo4j.gds.NodeLabel label)
        Specified by:
        hasLabel in interface IdMap
      • addNodeLabel

        public void addNodeLabel​(org.neo4j.gds.NodeLabel nodeLabel)
        Description copied from interface: IdMap
        Adds new node label to the available node labels. The labels is not assigned to any nodes at this point.
        Specified by:
        addNodeLabel in interface IdMap
        Parameters:
        nodeLabel - the node label to add
      • addNodeIdToLabel

        public void addNodeIdToLabel​(long nodeId,
                                     org.neo4j.gds.NodeLabel nodeLabel)
        Description copied from interface: IdMap
        Assigns a node to the given node label.
        Specified by:
        addNodeIdToLabel in interface IdMap
        Parameters:
        nodeId - the node id to assign
        nodeLabel - the node label to which the node will be assigned to