AbstractThe number of indices this mapping maps from, mapped or not.
It is the length of the arrays that gather returns and that reduce takes.
Time: O(1).
Whether some index is not mapped. Equivalent to mappedCount < indexCount.
Time: O(1).
The number of indices that are mapped; in a partition, the number of indices that belong to a group.
Time: O(1).
A mapping from the indices
0..indexCount-1to the indices of another numbering. It is the common base of the node and edge mappings and of the partitions.The indices are node IDs or edge indices.
get(i)is the index thatimaps to, or-1ifiis not mapped; a mapping with unmapped indices is partial. A NodeMapping maps the node IDs of one graph to those of another, and an EdgeMapping does the same for edge indices. Neither maps two indices to the same index, so both can be inverted. An IndexPartition maps indices to groups and lists the indices of each group. Several indices can map to the same group.That a node or edge mapping maps no two indices to the same index is a contract, not a check: NodeMapping.of accepts an array that breaks it, and only
invertedand Graphs.remapped reject such a mapping.Instances are immutable.
Memory: 4 x indexCount bytes; a partition holds more.