public double migrationEventProposalDensity(int x,int y,double t,double[] m){
  if (x == y) {
    return Math.exp(-t * m[1 - x]);
  }
 else {
    return Math.exp(-t * m[1 - x]) * m[1 - x];
  }
}

public double migrationEventProposalDensity ( int x , int y , double t , double [ ] m ) { if ( x == y ) { return Math . exp ( - t * m [ 1 - x ] ) ; } else { return Math . exp ( - t * m [ 1 - x ] ) * m [ 1 - x ] ; } }
the probability density of being in state x in the time interval [ 0 , t ) and migrating to state y at time t . in case x = = y , the function returns the probability ( not : density ) of surviving in state x during the interval [ 0 , t ] .
