public void purgeEvent(int[] idx){
        if(idx.length==0){
            return;
        }
        
        System.out.println("PURGE: "+numF1+", "+idx.length);
        this.numF1=this.numF1-idx.length;
        double[][][] new_weight = new double[numCode][numF1][];
        
        for(int i=0;i<idx.length;i++){
            System.out.print(""+idx[i]+"\t");
        }
        System.out.println("");
        System.out.println("("+weight.length+","+weight[0].length+","+weight[0][0].length+")");
        
        /*for(int i=0;i<2;i++){
            for(int j=0;j<weight[i].length;j++){
                for(int k=0;k<weight[i][j].length;k++){
                    System.out.print(""+weight[i][j][k]+"\t");
                }
                //System.out.println("");
            }
            System.out.println("");
        }*/
        
        for(int i=0; i<numCode; i++){
                int k=0;
    		for (int j=0; j<weight[i].length; j++) {
                    boolean purged=false;
                    for(int x=0;x<idx.length;x++){
                        if(j==idx[x]){
                            purged=true;
                            break;
                        }
                    }
                    
    			if (!purged) {
    				new_weight[i][k] = weight[i][j];
    				k++;
    			}
    		}
        }        
        weight = new_weight;
        activityF1=new double[numF1][maxIdEvents];
        
        System.out.println("AFTER PURGE*******");
        
         System.out.println("("+weight.length+","+weight[0].length+","+weight[0][0].length+")");
        /*for(int i=0;i<2;i++){
            for(int j=0;j<weight[i].length;j++){
                for(int k=0;k<weight[i][j].length;k++){
                    System.out.print(""+weight[i][j][k]+"\t");
                }
                //System.out.println("");
            }
            System.out.println("");
        }*/
    }