public final int[] randomCARule(int maxLength, int actualLength, Random randNum){
     
        int[] itemArray = new int[maxLength];
        for(int k =0;k < itemArray.length;k++)
            itemArray[k] = -1;
        if(actualLength == 1)
            return itemArray;
        int help =actualLength-1;
        if(help == maxLength-1){
            help = 0;
            for(int h = 0; h < itemArray.length; h++){
                if(h != m_instances.classIndex()){
                    itemArray[h] = m_randNum.nextInt((m_instances.attribute(h)).numValues());
                }
            }
        }
        while(help > 0){
            int mark = randNum.nextInt(maxLength);
            if(itemArray[mark] == -1 && mark != m_instances.classIndex()){
                help--;
                itemArray[mark] = m_randNum.nextInt((m_instances.attribute(mark)).numValues());
            }
       }
        return itemArray;
    }