+ //flip maps since we now know the total length
+ map<int, int> newAMap;
+ for (map<int, int>::iterator it = ABaseMap.begin(); it != ABaseMap.end(); it++) {
+ int spot = it->second;
+ newAMap[pairwiseLength-spot-1] = it->first-1;
+ }
+ ABaseMap = newAMap;
+ map<int, int> newBMap;
+ for (map<int, int>::iterator it = BBaseMap.begin(); it != BBaseMap.end(); it++) {
+ int spot = it->second;
+ newBMap[pairwiseLength-spot-1] = it->first-1;
+ }
+ BBaseMap = newBMap;
+