private boolean[] defineIrrelevant(Random random){
  boolean[] irr=new boolean[getNumAttributes()];
  for (int i=0; i < irr.length; i++) {
    irr[i]=false;
  }
  int numIrr=0;
  for (int i=0; (numIrr < getNumIrrelevant()) && (i < getNumAttributes() * 5); i++) {
    int maybeNext=(int)(random.nextDouble() * irr.length);
    if (irr[maybeNext] == false) {
      irr[maybeNext]=true;
      numIrr++;
    }
  }
  return irr;
}

private boolean [ ] defineIrrelevant ( Random random ) { boolean [ ] irr = new boolean [ getNumAttributes ( ) ] ; for ( int i = 0 ; i < irr . length ; i ++ ) { irr [ i ] = false ; } int numIrr = 0 ; for ( int i = 0 ; ( numIrr < getNumIrrelevant ( ) ) && ( i < getNumAttributes ( ) * 5 ) ; i ++ ) { int maybeNext = ( int ) ( random . nextDouble ( ) * irr . length ) ; if ( irr [ maybeNext ] == false ) { irr [ maybeNext ] = true ; numIrr ++ ; } } return irr ; }
defines randomly the attributes as irrelevant . number of attributes to be set as irrelevant is either set with a preceeding call of setnumirrelevant ( ) or is per default 0 .
