public void contractARGWithRecombinant(Node oldie1,Node oldie2,CompoundParameter internalNodeParameters,CompoundParameter internalAndRootNodeParameters,CompoundParameter nodeRates){
  removeVariable(oldie1.heightParameter);
  removeVariable(oldie2.heightParameter);
  removeVariable(oldie2.partitioning);
  removeVariable(oldie1.rateParameter);
  removeVariable(oldie2.rateParameter);
  removedParameters=new Parameter[4];
  removedParameters[0]=oldie1.heightParameter;
  removedParameters[1]=oldie2.heightParameter;
  removedParameters[2]=oldie1.rateParameter;
  removedParameters[3]=oldie2.rateParameter;
  partitioningParameters.removeParameter(oldie2.partitioning);
  removedPartitioningParameter=oldie2.partitioning;
  storedInternalNodeHeights=internalNodeParameters;
  storedInternalNodeHeights.removeParameter(oldie1.heightParameter);
  storedInternalNodeHeights.removeParameter(oldie2.heightParameter);
  storedInternalAndRootNodeHeights=internalAndRootNodeParameters;
  storedInternalAndRootNodeHeights.removeParameter(oldie1.heightParameter);
  storedInternalAndRootNodeHeights.removeParameter(oldie2.heightParameter);
  storedNodeRates=nodeRates;
  storedNodeRates.removeParameter(oldie1.rateParameter);
  storedNodeRates.removeParameter(oldie2.rateParameter);
  nodes.remove(oldie1);
  nodes.remove(oldie2);
  internalNodeCount-=2;
}

public void contractARGWithRecombinant ( Node oldie1 , Node oldie2 , CompoundParameter internalNodeParameters , CompoundParameter internalAndRootNodeParameters , CompoundParameter nodeRates ) { removeVariable ( oldie1 . heightParameter ) ; removeVariable ( oldie2 . heightParameter ) ; removeVariable ( oldie2 . partitioning ) ; removeVariable ( oldie1 . rateParameter ) ; removeVariable ( oldie2 . rateParameter ) ; removedParameters = new Parameter [ 4 ] ; removedParameters [ 0 ] = oldie1 . heightParameter ; removedParameters [ 1 ] = oldie2 . heightParameter ; removedParameters [ 2 ] = oldie1 . rateParameter ; removedParameters [ 3 ] = oldie2 . rateParameter ; partitioningParameters . removeParameter ( oldie2 . partitioning ) ; removedPartitioningParameter = oldie2 . partitioning ; storedInternalNodeHeights = internalNodeParameters ; storedInternalNodeHeights . removeParameter ( oldie1 . heightParameter ) ; storedInternalNodeHeights . removeParameter ( oldie2 . heightParameter ) ; storedInternalAndRootNodeHeights = internalAndRootNodeParameters ; storedInternalAndRootNodeHeights . removeParameter ( oldie1 . heightParameter ) ; storedInternalAndRootNodeHeights . removeParameter ( oldie2 . heightParameter ) ; storedNodeRates = nodeRates ; storedNodeRates . removeParameter ( oldie1 . rateParameter ) ; storedNodeRates . removeParameter ( oldie2 . rateParameter ) ; nodes . remove ( oldie1 ) ; nodes . remove ( oldie2 ) ; internalNodeCount -= 2 ; }
cleans up the arg model after a deletion event .
