public static final int[] toIntArray(Instance x,int L){
  int y[]=new int[L];
  for (int j=0; j < L; j++) {
    if (x.isMissing(j)) {
      y[j]=-1;
    }
 else {
      y[j]=(int)Math.round(x.value(j));
    }
  }
  return y;
}

public static final int [ ] toIntArray ( Instance x , int L ) { int y [ ] = new int [ L ] ; for ( int j = 0 ; j < L ; j ++ ) { if ( x . isMissing ( j ) ) { y [ j ] = - 1 ; } else { y [ j ] = ( int ) Math . round ( x . value ( j ) ) ; } } return y ; }
tointarray - raw instance to int [ ] representation
