private double[] logPToP(double[] llContribution, double[] pPrevious) {
	
		double[] p = new double[llContribution.length];
		
		double sum = 0.0;
		for( int i = 0; i < llContribution.length; ++i) {
			p[i] = Math.exp(llContribution[i]);
			sum += p[i];
		}
		// Normalization
		if( pPrevious != null)
			if( sum != 0.0) {
				double sum2 = 0.0;
				for( int i = 0; i < llContribution.length; ++i) {
					p[i] = (p[i] / sum) * pPrevious[i];
					sum2 += p[i];
				}
				for( int i = 0; i < llContribution.length; ++i)
					p[i] = (p[i] / sum2);
			} else
				for( int i = 0; i < llContribution.length; ++i)
					p[i] = pPrevious[i];
		else
			for( int i = 0; i < llContribution.length; ++i)
				p[i] = (p[i] / sum);							// the sum can not be zero because at the first time slice there is the class prior
		
		return p;
	}