public double[] getNormalWeights()
    {
    	double ret[] = new double[weight.length];
    	double totalsum = 0.0;
    	double truesum = 0.0;
    	int totalindex = 0;
    	
    	for (int i = 0; i < weight.length; i++)
    	{
    		totalsum += weight[i];
    		if (index[i])
    		{
    			truesum += weight[i];
    			totalindex++;
    		}
    	}
    	
    	for (int i = 0; i < weight.length; i++)
    	switch (type)    	
    	{
    	case 0: // boolean
    		if (index[i])
    			ret[i] = 1.0/totalindex;
    		break;
    	case 1: // real
    		ret[i] = weight[i]/totalsum;
    		break;
    	case 2: // mix
    		if (index[i])
    			ret[i] = weight[i]/truesum;
    		break;
    	}

    	return ret;
    }