code: protected void markMerge(int regionA, int regionB) {
  
  		int dA = mergeList.data[regionA];
  		int dB = mergeList.data[regionB];
  
  		// Quick check to see if they reference the same node
  		if( dA == dB ) {
  			return;
  		}
  
  		// search down to the root node  (set-find)
  		int rootA = regionA;
  		while( dA != rootA ) {
  			rootA = dA;
  			dA = mergeList.data[rootA];
  		}
  
  		int rootB = regionB;
  		while( dB != rootB ) {
  			rootB = dB;
  			dB = mergeList.data[rootB];
  		}
  
  		// make rootA the parent.  This allows the quick test to pass in the future
  		mergeList.data[regionA] = rootA;
  		mergeList.data[regionB] = rootA;
  		mergeList.data[rootB] = rootA;
  	}
docs: <p>This function will mark two regions for merger.  Equivalent to set-union operation.</p>
  
  <p>
  If the two regions have yet to be merged into any others then regionB will become a member of regionA.
  Otherwise a quick heck is done to see if they are already marked for merging.  If that fails it will
  traverse down the tree for each region until it gets to their roots.  If the roots are not the same then
  they are merged.  Either way the path is updated such that the quick check will pass.
  </p>