public void finaliseMotif(){
  finalConnections=new int[nrMotifNodes][];
  for (int i=0; i < nrMotifNodes; i++) {
    ArrayList<Integer> a=initialConnections.get(i);
    finalConnections[i]=new int[a.size()];
    MotifLink[] finalLinks=new MotifLink[a.size()];
    for (int j=0; j < a.size(); j++) {
      finalConnections[i][j]=a.get(j);
      finalLinks[j]=links[i][a.get(j)];
    }
    links[i]=finalLinks;
  }
  initialConnections=null;
}

public void finaliseMotif ( ) { finalConnections = new int [ nrMotifNodes ] [ ] ; for ( int i = 0 ; i < nrMotifNodes ; i ++ ) { ArrayList < Integer > a = initialConnections . get ( i ) ; finalConnections [ i ] = new int [ a . size ( ) ] ; MotifLink [ ] finalLinks = new MotifLink [ a . size ( ) ] ; for ( int j = 0 ; j < a . size ( ) ; j ++ ) { finalConnections [ i ] [ j ] = a . get ( j ) ; finalLinks [ j ] = links [ i ] [ a . get ( j ) ] ; } links [ i ] = finalLinks ; } initialConnections = null ; }
finalises motif construction by optimising internal data structures for further use in the algorithm
