Created new function for getting linear index.
Retrieves linear index for subindex map.
Created by factoring out code from corresponding operator()