for(j = 0; j < Constants.numInterests; j++) { for(k = 0; k < Constants.numInterests; k++) if(k != j) probsArr[k] = probsArr[k] - L*(((double)numInterestsArray[j]) / ((double)estimate))*probsArr[k]; for(k = 0; k < Constants.numInterests; k++) if(k != j) tempProbSum += probsArr[k]; probsArr[j] = probsArr[j] + L*(((double)numInterestsArray[j]) / ((double)estimate))*tempProbSum; }