void crossOver(BayesNetRepresentation other){
  boolean[] bits=new boolean[m_bits.length];
  for (int i=0; i < m_bits.length; i++) {
    bits[i]=m_bits[i];
  }
  int iCrossOverPoint=m_bits.length;
  do {
    for (int i=iCrossOverPoint; i < m_bits.length; i++) {
      m_bits[i]=bits[i];
    }
    iCrossOverPoint=m_random.nextInt(m_bits.length);
    for (int i=iCrossOverPoint; i < m_bits.length; i++) {
      m_bits[i]=other.m_bits[i];
    }
  }
 while (hasCycles());
  calcGlobalScore();
}

void crossOver ( BayesNetRepresentation other ) { boolean [ ] bits = new boolean [ m_bits . length ] ; for ( int i = 0 ; i < m_bits . length ; i ++ ) { bits [ i ] = m_bits [ i ] ; } int iCrossOverPoint = m_bits . length ; do { for ( int i = iCrossOverPoint ; i < m_bits . length ; i ++ ) { m_bits [ i ] = bits [ i ] ; } iCrossOverPoint = m_random . nextInt ( m_bits . length ) ; for ( int i = iCrossOverPoint ; i < m_bits . length ; i ++ ) { m_bits [ i ] = other . m_bits [ i ] ; } } while ( hasCycles ( ) ) ; calcGlobalScore ( ) ; }
apply cross - over operation to bayesnet calculate score and as a side effect sets bayesnet parent sets .
