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..6c21ddf 100644 --- a/src/QSymbolicsBase/utils.jl +++ b/src/QSymbolicsBase/utils.jl @@ -45,4 +45,4 @@ function countmap_flatten(samples, flattenhead) end end counts -end \ No newline at end of file +end