if(p_atomic_semiring.ATOMIC_SEMIRING==AtomicSemiring.LOG_SEMIRING){
double logProbP = - scale * computeTransitionCost(parent_item, dt, pFeatFunctions);//from p
double valQ = - scale * computeTransitionCost(parent_item, dt, qFeatFunctions);//from q;//s(x,y); to compute E(s(x,y)); real semiring
//double factor1 = Math.exp(logProbP)*valQ; //real semiring
SignedValue factor1 = SignedValue.multi(
logProbP,
SignedValue.createSignedValue(valQ)
);
res = new ExpectationSemiring(logProbP, factor1);
}else{