Is it really approriate to use the vector terminology throughout here?  I think it should be changed.  You are returning a map, not a vector.  I know that the lingua franca calls this a composition vector, but I don't think we can get away with that here and remain clear.