The constructor for ExplicitFactor suggests that it is a kind of VarTensor that is hard-coded to use RealAlgebra, but the fact that getLogUnormalizedScore directly returns array values suggests that they should be interpreted as log values (and hence implicitly use LogSemiring). Per @mgormley 's suggestion, it would make more sense for ExplicitFactor either to wrap an instance of VarTensor instead extending it or to extend some other multidimensional array class.
The constructor for
ExplicitFactorsuggests that it is a kind ofVarTensorthat is hard-coded to useRealAlgebra, but the fact thatgetLogUnormalizedScoredirectly returns array values suggests that they should be interpreted as log values (and hence implicitly useLogSemiring). Per @mgormley 's suggestion, it would make more sense forExplicitFactoreither to wrap an instance ofVarTensorinstead extending it or to extend some other multidimensional array class.