void copyNodeStructure(ArrayList<Node> destination){
  while (destination.size() < nodes.size())   destination.add(new Node());
  while (destination.size() > nodes.size())   destination.remove(0);
  int n=nodes.size();
  for (int i=0; i < n; i++) {
    Node node0=nodes.get(i);
    Node node1=destination.get(i);
    node1.heightParameter=node0.heightParameter;
    node1.rateParameter=node0.rateParameter;
    node1.traitParameter=node0.traitParameter;
    node1.partitioning=node0.partitioning;
    node1.taxon=node0.taxon;
    node1.bifurcation=node0.bifurcation;
    node1.number=node0.number;
    node1.myHashCode=node0.myHashCode;
    if (node0.leftParent != null) {
      node1.leftParent=storedNodes.get(nodes.indexOf(node0.leftParent));
    }
 else {
      node1.leftParent=null;
    }
    if (node0.rightParent != null) {
      node1.rightParent=storedNodes.get(nodes.indexOf(node0.rightParent));
    }
 else {
      node1.rightParent=null;
    }
    if (node0.leftChild != null) {
      node1.leftChild=storedNodes.get(nodes.indexOf(node0.leftChild));
    }
 else {
      node1.leftChild=null;
    }
    if (node0.rightChild != null) {
      node1.rightChild=storedNodes.get(nodes.indexOf(node0.rightChild));
    }
 else {
      node1.rightChild=null;
    }
  }
}

void copyNodeStructure ( ArrayList < Node > destination ) { while ( destination . size ( ) < nodes . size ( ) ) destination . add ( new Node ( ) ) ; while ( destination . size ( ) > nodes . size ( ) ) destination . remove ( 0 ) ; int n = nodes . size ( ) ; for ( int i = 0 ; i < n ; i ++ ) { Node node0 = nodes . get ( i ) ; Node node1 = destination . get ( i ) ; node1 . heightParameter = node0 . heightParameter ; node1 . rateParameter = node0 . rateParameter ; node1 . traitParameter = node0 . traitParameter ; node1 . partitioning = node0 . partitioning ; node1 . taxon = node0 . taxon ; node1 . bifurcation = node0 . bifurcation ; node1 . number = node0 . number ; node1 . myHashCode = node0 . myHashCode ; if ( node0 . leftParent != null ) { node1 . leftParent = storedNodes . get ( nodes . indexOf ( node0 . leftParent ) ) ; } else { node1 . leftParent = null ; } if ( node0 . rightParent != null ) { node1 . rightParent = storedNodes . get ( nodes . indexOf ( node0 . rightParent ) ) ; } else { node1 . rightParent = null ; } if ( node0 . leftChild != null ) { node1 . leftChild = storedNodes . get ( nodes . indexOf ( node0 . leftChild ) ) ; } else { node1 . leftChild = null ; } if ( node0 . rightChild != null ) { node1 . rightChild = storedNodes . get ( nodes . indexOf ( node0 . rightChild ) ) ; } else { node1 . rightChild = null ; } } }
copies the node connections from this argmodel ' s nodes array to the destination array . basically it connects up the nodes in destination in the same way as this argmodel is set up . this method is package private .
