Encapsulate the mapping between PhasedGenotypeState and NucleotideState, and using the API method to replace the follow code in loops, such as int[] getNucIndex(int phasedGTInd) and PhasedGenotypeState getPhasedGenotypeState(NucleotideState parent1st, NucleotideState parent2nd)
for (int i = 0; i < numStates; i++) {
int fromParent1State = i / 4;
int fromParent2State = i % 4;
for (int j = i + 1; j < numStates; j++) {
int toParent1State = j / 4;
int toParent2State = j % 4;
...
Encapsulate the mapping between PhasedGenotypeState and NucleotideState, and using the API method to replace the follow code in loops, such as
int[] getNucIndex(int phasedGTInd)
andPhasedGenotypeState getPhasedGenotypeState(NucleotideState parent1st, NucleotideState parent2nd)