diff --git a/src/dimensional-structures/logiset.jl b/src/dimensional-structures/logiset.jl index ccf6d0a..7b7c69d 100644 --- a/src/dimensional-structures/logiset.jl +++ b/src/dimensional-structures/logiset.jl @@ -447,7 +447,8 @@ end function allfeatvalues( X::UniformFullDimensionalLogiset, ) - unique(X.featstruct) + error("TODO only look at upper half") + vec(X.featstruct) end function allfeatvalues( @@ -461,12 +462,20 @@ end function allfeatvalues( X::UniformFullDimensionalLogiset, i_instance, - f, + f::AbstractFeature, ) return error("Please, provide method allfeatvalues(::" * "$(typeof(X)), i_instance::$(typeof(i_instance)), f::$(typeof(f))).") end +function allfeatvalues( + X::UniformFullDimensionalLogiset, + f::AbstractFeature, +) + return error("Please, provide method allfeatvalues(::" * + "$(typeof(X)), f::$(typeof(f))).") +end + ############################################################################################ function instances( diff --git a/src/scalar/conditions.jl b/src/scalar/conditions.jl index 2c3b510..72d82ba 100644 --- a/src/scalar/conditions.jl +++ b/src/scalar/conditions.jl @@ -493,7 +493,7 @@ function _multivariate_scalar_alphabet( domains::AbstractVector{<:AbstractVector}; sorted = true, truerfirst = true, - # skipextremes::Bool = true, + # skipextremes::Bool = true, # TODO discretizedomain::Bool = false, # TODO default behavior should depend on test_operator y::Union{Nothing,AbstractVector} = nothing, )::MultivariateScalarAlphabet diff --git a/src/scalar/propositional-logiset.jl b/src/scalar/propositional-logiset.jl index 0d10191..3b6b8ca 100644 --- a/src/scalar/propositional-logiset.jl +++ b/src/scalar/propositional-logiset.jl @@ -213,6 +213,7 @@ function alphabet( force_i_variables::Bool = false, test_operators::Union{Nothing,AbstractVector{<:TestOperator},Base.Callable} = nothing, discretizedomain::Bool = false, + unique::Bool = false, kwargs... )::MultivariateScalarAlphabet feats = collect(features(X; force_i_variables = force_i_variables)) @@ -221,7 +222,7 @@ function alphabet( domains = [begin domain = Tables.getcolumn(gettable(X), i_variable(feat)) - if !discretizedomain + if unique && !discretizedomain domain = unique(domain) end domain diff --git a/test/scalar-alphabet.jl b/test/scalar-alphabet.jl index 50a5370..627667f 100644 --- a/test/scalar-alphabet.jl +++ b/test/scalar-alphabet.jl @@ -17,6 +17,6 @@ a = ExplicitAlphabet(collect(atoms(myalphabet_symbol))) @test_nowarn SoleData.scalaralphabet(a) a = ExplicitAlphabet(collect(atoms(alphabet(X, test_operators = [<, ≥])))) -@test (@test_logs (:warn,) SoleData.scalaralphabet(a; discretizedomain = true)) +@test_logs (:warn,) SoleData.scalaralphabet(a; discretizedomain = true) # @test_throws ErrorException SoleData.scalaralphabet(a; discretizedomain = true) # @test_nowarn SoleData.scalaralphabet(a; discretizedomain = true, y = y)