diff --git a/src/QSymbolicsBase/express.jl b/src/QSymbolicsBase/express.jl index 8fd6466..54031ab 100644 --- a/src/QSymbolicsBase/express.jl +++ b/src/QSymbolicsBase/express.jl @@ -64,6 +64,11 @@ express_nolookup(x, repr::AbstractRepresentation, ::UseAsState) = express_nolook # where the cache is a distribution over possible samples. express_from_cache(cache) = cache +function consistent_representation(regs,idx,state) + reprs = Set([r.reprs[i] for (r,i) in zip(regs,idx)]) + consistent_representation(reprs,state) +end + """Pick a representation that is consistent with given representations and appropriate for the given state.""" function consistent_representation(reprs,state) reprs = Set(reprs) diff --git a/src/QSymbolicsBase/utils.jl b/src/QSymbolicsBase/utils.jl index 5afe9f1..90e140f 100644 --- a/src/QSymbolicsBase/utils.jl +++ b/src/QSymbolicsBase/utils.jl @@ -1,3 +1,4 @@ + function prefactorscalings(xs) terms = [] coeff = 1::Any @@ -45,4 +46,4 @@ function countmap_flatten(samples, flattenhead) end end counts -end \ No newline at end of file +end