Class ArrayIdMap

    • Constructor Detail

      • ArrayIdMap

        public ArrayIdMap​(HugeLongArray internalToOriginalIds,
                          org.neo4j.gds.collections.HugeSparseLongArray originalToInternalIds,
                          LabelInformation labelInformation,
                          long nodeCount,
                          long highestNeoId)
        initialize the map with pre-built sub arrays
    • Method Detail

      • memoryEstimation

        public static org.neo4j.gds.core.utils.mem.MemoryEstimation memoryEstimation()
      • toMappedNodeId

        public long toMappedNodeId​(long originalNodeId)
        Description copied from interface: PartialIdMap
        Maps an original node id to a mapped node id. In case of nested id maps, the mapped node id is always in the space of the innermost mapping.
        Parameters:
        originalNodeId - must be smaller or equal to the id returned by IdMap.highestOriginalId()
      • toOriginalNodeId

        public long toOriginalNodeId​(long mappedNodeId)
        Description copied from interface: IdMap
        Returns the original node id for the given mapped node id. The original node id is typically the Neo4j node id. This method is guaranteed to always return the Neo4j id, regardless of the given mapped node id refers to a filtered node id space or a regular / unfiltered node id space.
      • toRootNodeId

        public long toRootNodeId​(long mappedNodeId)
        Description copied from interface: IdMap
        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.
      • rootIdMap

        public IdMap rootIdMap()
        Description copied from interface: IdMap
        Returns the original node mapping if the current node mapping is filtered, otherwise it returns itself.
      • containsOriginalId

        public boolean containsOriginalId​(long originalNodeId)
        Description copied from interface: IdMap
        Returns true iff the Neo4j id is mapped, otherwise false.
      • rootNodeCount

        public java.util.OptionalLong rootNodeCount()
        Description copied from interface: PartialIdMap
        Number of mapped node ids in the root mapping. This is necessary for nested (filtered) id mappings.
      • highestOriginalId

        public long highestOriginalId()
        Description copied from interface: IdMap
        The highest id that is mapped in this id mapping.

        The value is the upper bound of the original node id space.

      • withFilteredLabels

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