Interface IdMap

    • Field Detail

      • START_NODE_ID

        static final long START_NODE_ID
        Defines the lower bound of mapped ids
        See Also:
        Constant Field Values
      • NOT_FOUND

        static final long NOT_FOUND
        Defines the value for unmapped ids
        See Also:
        Constant Field Values
    • Method Detail

      • safeToMappedNodeId

        default long safeToMappedNodeId​(long originalNodeId)
        Map original nodeId to mapped nodeId Returns org.neo4j.gds.api.IdMap#NOT_FOUND if the nodeId is not mapped.
      • toOriginalNodeId

        long toOriginalNodeId​(long mappedNodeId)
        Map mapped nodeId back to neo4j nodeId
      • toRootNodeId

        long toRootNodeId​(long mappedNodeId)
        Maps a filtered mapped node id to its root mapped node id. This is necessary for nested (filtered) id mappings. If this mapping is a nested mapping, this method returns the root mapped node id of the parent mapping. For the root mapping this method returns the given node id.
      • contains

        boolean contains​(long originalNodeId)
        Returns true iff the neo4jNodeId is mapped, otherwise false.
      • nodeCount

        long nodeCount()
        Number of mapped nodeIds.
      • highestNeoId

        long highestNeoId()
      • nodeLabels

        java.util.List<org.neo4j.gds.NodeLabel> nodeLabels​(long mappedNodeId)
      • availableNodeLabels

        java.util.Set<org.neo4j.gds.NodeLabel> availableNodeLabels()
      • hasLabel

        boolean hasLabel​(long mappedNodeId,
                         org.neo4j.gds.NodeLabel label)
      • rootIdMap

        IdMap rootIdMap()
        Returns the original node mapping if the current node mapping is filtered, otherwise it returns itself.
      • withFilteredLabels

        default java.util.Optional<? extends FilteredIdMap> withFilteredLabels​(java.util.Collection<org.neo4j.gds.NodeLabel> nodeLabels,
                                                                               int concurrency)