Add mapping (node ID -> matrix idx)