Added the pointwiseMultiplication function to Factor.java