IndexMap
IndexMap
¶
Maps node indices to string ids
Source code in src/pathpyG/core/IndexMap.py
__init__
¶
Initialize mapping from indices to node IDs.
Source code in src/pathpyG/core/IndexMap.py
add_id
¶
Assigns additional ID to next consecutive index.
Source code in src/pathpyG/core/IndexMap.py
add_ids
¶
Assigns additional IDs to next consecutive indices.
Source code in src/pathpyG/core/IndexMap.py
to_id
¶
Map index to ID if mapping is defined, return index otherwise.
Source code in src/pathpyG/core/IndexMap.py
to_ids
¶
Map list of indices to IDs if mapping is defined, return indices otherwise.
to_idx
¶
Map argument (ID or index) to index if mapping is defined, return argument otherwise.
to_idxs
¶
Map list of arguments (IDs or indices) to indices if mapping is defined, return argument otherwise.