protected String num2ShortID(int num,char[] IDChars,int IDWidth){
  char ID[]=new char[IDWidth];
  int i;
  for (i=IDWidth - 1; i >= 0; i--) {
    ID[i]=IDChars[num % IDChars.length];
    num=num / IDChars.length - 1;
    if (num < 0) {
      break;
    }
  }
  for (i--; i >= 0; i--) {
    ID[i]=' ';
  }
  return new String(ID);
}

protected String num2ShortID ( int num , char [ ] IDChars , int IDWidth ) { char ID [ ] = new char [ IDWidth ] ; int i ; for ( i = IDWidth - 1 ; i >= 0 ; i -- ) { ID [ i ] = IDChars [ num % IDChars . length ] ; num = num / IDChars . length - 1 ; if ( num < 0 ) { break ; } } for ( i -- ; i >= 0 ; i -- ) { ID [ i ] = ' ' ; } return new String ( ID ) ; }
method for generating indices for the confusion matrix .
