Skip to content

Commit 1c0bb03

Browse files
committed
Merge branch 'dev' into gio/refractoring
2 parents dfe94c6 + 6668e77 commit 1c0bb03

File tree

12 files changed

+520
-502
lines changed

12 files changed

+520
-502
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "SoleModels"
22
uuid = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8"
33
license = "MIT"
44
authors = ["Michele GHIOTTI", "Giovanni PAGLIARINI", "Edoardo PONSANESI", "Eduard I. STAN"]
5-
version = "0.8.3"
5+
version = "0.9.0"
66

77
[deps]
88
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -52,7 +52,7 @@ Random = "1"
5252
Reexport = "1"
5353
Revise = "3"
5454
SoleBase = "0.12"
55-
SoleData = "0.15"
55+
SoleData = "0.15, 0.16"
5656
SoleLogics = "0.9, 0.10"
5757
StatsBase = "0.30 - 0.34"
5858
Suppressor = "0.2"

src/SoleModels.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ using SoleData.DimensionalDatasets: globalrel
3131
export AbstractModel
3232
export iscomplete
3333
export outcometype, outputtype
34+
export immediatesubmodels, nimmediatesubmodels, listimmediaterules
3435
export apply, apply!
3536
export info, info!, hasinfo
3637
export wrap
@@ -60,7 +61,10 @@ export trees
6061

6162
export MixedModel
6263

64+
export solemodel
65+
6366
include("types/model.jl")
67+
include("types/AbstractTrees.jl")
6468
include("types/api.jl")
6569

6670
include("utils/models/leaf.jl")
@@ -70,13 +74,14 @@ include("utils/models/linear-forms-utilities.jl")
7074
include("utils/models/wrap.jl")
7175
include("utils/models/syntax-utilities.jl")
7276

73-
include("apply!.jl")
7477

7578
export printmodel, displaymodel
7679

7780
include("print.jl")
7881

79-
export immediatesubmodels, listimmediaterules
82+
export submodels, nsubmodels
83+
export leafmodels, nleafmodels
84+
export subtreeheight
8085
export listrules, joinrules
8186

8287
include("symbolic-utils.jl")

src/apply!.jl

Lines changed: 0 additions & 311 deletions
This file was deleted.

src/deprecate.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,16 @@ const MixedSymbolicModel = MixedModel
33
const List = DecisionList
44
const Tree = DecisionTree
55
const Forest = DecisionForest
6+
7+
8+
9+
@inline function apply(
10+
m::AbstractModel,
11+
d::AbstractInterpretationSet,
12+
i_instance::Integer;
13+
kwargs...
14+
)::outputtype(m)
15+
@warn "apply(model, dataset, i_instance) is deprecating... Please use apply(model, get_instance(dataset, i_instance)) instead."
16+
interpretation = get_instance(d, i_instance)
17+
apply(m, interpretation; kwargs...)
18+
end

src/evaluate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function evaluaterule(
215215
)
216216
#println("Evaluation rule in time...")
217217
ys = apply(rule,X)
218-
#if X isa SupportedLogiset
218+
#if SoleData.hassupports(X)
219219
# println("# Memoized Values: $(nmemoizedvalues(X))")
220220
#end
221221

0 commit comments

Comments
 (0)