docs: private void computePeriod(InfoTree it1, int aVp, int aNextVp, InfoTree it2, int aStrategy) {
  
  		int fTreeSize = it1.getSize();
  		int gTreeSize = it2.getSize();
  
  		int vpPreorder = it1.info[POST2_PRE][aVp];
  		int vpRevPreorder = fTreeSize - 1 - aVp;
  		int vpSize = it1.info[POST2_SIZE][aVp];
  
  		int gSize = it2.info[POST2_SIZE][it2.getCurrentNode()];
  		int gPreorder = it2.info[POST2_PRE][it2.getCurrentNode()];
  		int gRevPreorder = gTreeSize - 1 - it2.getCurrentNode();
  
  		int nextVpPreorder = -1;
  		int nextVpRevPreorder = -1;
  		int nextVpSize = -1;
  		// count k and assign next vp values
  		int k;
  		if (aNextVp != -1) {
  			nextVpPreorder = it1.info[POST2_PRE][aNextVp];
  			nextVpRevPreorder = fTreeSize - 1 - aNextVp;
  			nextVpSize = it1.info[POST2_SIZE][aNextVp];
  			// if strategy==LEFT use preorder to count number of left deletions from vp to
  			// vp-1
  			// if strategy==RIGHT use reversed preorder
  			k = aStrategy == LEFT ? nextVpPreorder - vpPreorder
  					: nextVpRevPreorder - vpRevPreorder;
  			if (aStrategy != previousStrategy) {
  				computeIJTable(it2, gPreorder, gRevPreorder, gSize, aStrategy, gTreeSize);
  			}
  		} else {
  			k = 1;
  			computeIJTable(it2, gPreorder, gRevPreorder, gSize, aStrategy, gTreeSize);
  		}
  
  		int realStrategy = it1.info[POST2_STRATEGY][aVp];
  
  		boolean switched = it1.isSwitched();
  
  		double[][] tTable_copy = t.clone();
  
  		// Q and T are visible for every i
  		double[] qTable = new double[k];
  
  		// if aVp is a leaf => precompute table T - edit distance betwen EMPTY and all
  		// subforests of G
  
  		// check if nextVp is the only child of vp
  		if (vpSize - nextVpSize == 1) {
  			// update delta from T table => dist between Fvp-1 and G was computed in
  			// previous compute period
  			if (gSize == 1) {
  				setDeltaValue(it1.info[PRE2_POST][vpPreorder], it2.info[PRE2_POST][gPreorder],
  						vpSize - 1, switched);
  			} else {
  				setDeltaValue(it1.info[PRE2_POST][vpPreorder], it2.info[PRE2_POST][gPreorder],
  						t[1][0], switched);
  			}
  		}
  
  		double[][] sTable;// = new double[k][gTreeSize+1];
  
  		int gijForestPreorder;
  		int previousI;
  		int fForestPreorderKPrime;
  		int jPrime;
  		int kBis;
  		int jOfIminus1;
  		int gijOfIMinus1Preorder;
  		int jOfI;
  		double deleteFromLeft;
  		double deleteFromRight;
  		double match;
  		int fLabel;
  		int gLabel;
  
  		// Q and T are visible for every i
  		for (int i = gSize - 1; i >= 0; i--) {
  
  			// jOfI was already computed once in spfH
  			jOfI = jOfI(it2, i, gSize, gRevPreorder, gPreorder, aStrategy, gTreeSize);
  
  			// when strategy==BOTH first LEFT then RIGHT is done
  
  			counter += realStrategy == BOTH && aStrategy == LEFT ? (k - 1) * (jOfI + 1)
  					: k * (jOfI + 1);
  
  			// compute table S - visible for actual i
  
  			sTable = new double[k][jOfI + 1]; // initialized outside loop? -> doesn't work
  
  			for (int kPrime = 1; kPrime <= k; kPrime++) {
  
  				fForestPreorderKPrime = aStrategy == LEFT ? vpPreorder + (k - kPrime)
  						: it1.info[POST2_PRE][fTreeSize - 1 - (vpRevPreorder + (k - kPrime))];
  				kBis = kPrime - it1.info[POST2_SIZE][it1.info[PRE2_POST][fForestPreorderKPrime]];
  
  				// reset the minimum arguments' values
  				deleteFromRight = costIns;
  				deleteFromLeft = costDel;
  				match = 0;
  
  				match += aStrategy == LEFT ? kBis + nextVpSize : vpSize - k + kBis;
  
  				if ((i + jOfI) == (gSize - 1)) {
  					deleteFromRight += (vpSize - (k - kPrime));
  				} else {
  					deleteFromRight += qTable[kPrime - 1];
  				}
  
  				fLabel = it1.info[POST2_LABEL][it1.info[PRE2_POST][fForestPreorderKPrime]];
  
  				for (int j = jOfI; j >= 0; j--) {
  					// count dist(FkPrime, Gij) with min
  
  					// delete from left
  
  					gijForestPreorder = aStrategy == LEFT ? IJ[i][j]
  							: it2.info[POST2_PRE][gTreeSize - 1 - IJ[i][j]];
  
  					if (kPrime == 1) {
  						// if the direction changed from the previous period to this one use i and j
  						// of
  						// previous strategy
  
  						// since T is overwritten continously, thus use T_copy for getting values
  						// from
  						// previous period
  
  						if (aStrategy != previousStrategy) {
  							if (aStrategy == LEFT) {
  								previousI = gijForestPreorder - gPreorder; // minus preorder of G
  							} else {
  								previousI = gTreeSize - 1
  										- it2.info[RPOST2_POST][gTreeSize - 1 - gijForestPreorder]
  										- gRevPreorder; // minus rev preorder of G
  							}
  							deleteFromLeft += tTable_copy[previousI][i + j - previousI];
  						} else {
  							deleteFromLeft += tTable_copy[i][j];
  						}
  
  					} else {
  						deleteFromLeft += sTable[kPrime - 1 - 1][j];
  					}
  
  					// match
  
  					match += switched
  							?
  							delta[it2.info[PRE2_POST][gijForestPreorder]][it1.info[PRE2_POST][fForestPreorderKPrime]]
  							:
  							delta[it1.info[PRE2_POST][fForestPreorderKPrime]][it2.info[PRE2_POST][gijForestPreorder]];
  
  					jPrime = j + it2.info[POST2_SIZE][it2.info[PRE2_POST][gijForestPreorder]];
  
  					// if root nodes of L/R Fk' and L/R Gij have different labels add the match cost
  					gLabel = it2.info[POST2_LABEL][it2.info[PRE2_POST][gijForestPreorder]];
  
  					if (fLabel != gLabel) {
  						match += costMatch;
  					}
  
  					// this condition is checked many times but is not satisfied only once
  					if (j != jOfI) {
  						// delete from right
  						deleteFromRight += sTable[kPrime - 1][j + 1];
  						if (kBis == 0) {
  							if (aStrategy != previousStrategy) {
  								previousI = aStrategy == LEFT ? IJ[i][jPrime] - gPreorder
  										: IJ[i][jPrime] - gRevPreorder;
  								match += tTable_copy[previousI][i + jPrime - previousI];
  							} else {
  								match += tTable_copy[i][jPrime];
  							}
  						} else if (kBis > 0) {
  							match += sTable[kBis - 1][jPrime];
  						} else {
  							match += gSize - (i + jPrime);
  						}
  
  					}
  
  					// fill S table
  					sTable[kPrime - 1][j] = (deleteFromLeft < deleteFromRight)
  							? ((deleteFromLeft < match) ? deleteFromLeft : match)
  							: ((deleteFromRight < match) ? deleteFromRight : match);
  
  					// reset the minimum arguments' values
  					deleteFromRight = costIns;
  					deleteFromLeft = costDel;
  					match = 0;
  				}
  			}
  
  			// compute table T => add row to T
  			if (realStrategy == BOTH && aStrategy == LEFT) {
  				t[i] = sTable[k - 1 - 1];
  			} else {
  				t[i] = sTable[k - 1];
  			}
  
  			if (i > 0) {
  				// compute table Q
  				jOfIminus1 =
  						jOfI(it2, i - 1, gSize, gRevPreorder, gPreorder, aStrategy, gTreeSize);
  				if (jOfIminus1 <= jOfI) {
  					for (int x = 0;
  					     x < qTable.length; x++) { // copy whole column | qTable.length=k
  						qTable[x] = sTable[x][jOfIminus1];
  					}
  				}
  
  				// fill table delta
  				if (i + jOfIminus1 < gSize) {
  
  					gijOfIMinus1Preorder = aStrategy == LEFT
  							? it2.info[POST2_PRE][gTreeSize - 1 - (gRevPreorder + (i - 1))]
  							: gPreorder + (i - 1);
  
  					// If Fk from Fk-1 differ with a single node,
  					// then Fk without the root node is Fk-1 and the distance value has to be taken
  					// from previous T table.
  					if (k - 1 - 1 < 0) {
  						if (aStrategy != previousStrategy) {
  							previousI = aStrategy == LEFT ? IJ[i][jOfIminus1] - gPreorder
  									: IJ[i][jOfIminus1] - gRevPreorder;
  							setDeltaValue(it1.info[PRE2_POST][vpPreorder],
  									it2.info[PRE2_POST][gijOfIMinus1Preorder],
  									tTable_copy[previousI][i + jOfIminus1 - previousI], switched);
  						} else {
  							setDeltaValue(it1.info[PRE2_POST][vpPreorder],
  									it2.info[PRE2_POST][gijOfIMinus1Preorder],
  									tTable_copy[i][jOfIminus1], switched);
  						}
  					} else {
  						setDeltaValue(it1.info[PRE2_POST][vpPreorder],
  								it2.info[PRE2_POST][gijOfIMinus1Preorder],
  								sTable[k - 1 - 1][jOfIminus1], switched);
  					}
  				}
  			}
  
  		}
  		previousStrategy = aStrategy;
  	}