This is used frequently, and should be more efficient. Please advise if there is a better way to access the dim'th element of the idx'th feature vector.