diff --git a/Project.toml b/Project.toml index 425c6280..ee785174 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SoleData" uuid = "123f1ae1-6307-4526-ab5b-aab3a92a2b8c" -authors = ["Mauro MILELLA", "Giovanni PAGLIARINI", "Edoardo PONSANESI", "Riccardo PASINI","Marco PERROTTA"] +authors = ["Mauro MILELLA", "Giovanni PAGLIARINI", "Edoardo PONSANESI", "Riccardo PASINI", "Marco PERROTTA"] version = "0.16.3" [deps] @@ -19,6 +19,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" MultiData = "8cc5100c-b3d1-4f82-90cb-0ea93d317aba" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" Query = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 08007fc8..c9256426 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.10" manifest_format = "2.0" project_hash = "5b81a6cdec9800ae3231e97d0b7b9145b8e8a09a" @@ -16,12 +16,13 @@ version = "0.4.5" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" +git-tree-sha1 = "7e35fca2bdfba44d797c53dfe63a51fabf39bfc0" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.4" -weakdeps = ["StaticArrays"] +version = "4.4.0" +weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" AdaptStaticArraysExt = "StaticArrays" [[deps.AliasTables]] @@ -41,16 +42,22 @@ uuid = "ec485272-7323-5ecc-a04f-4719b315124d" version = "0.4.0" [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "c5aeb516a84459e0318a02507d2261edad97eb75" +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "dbd8c3bbbdbb5c2778f85f4422c39960eac65a42" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.7.1" +version = "7.20.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceMetalExt = "Metal" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -58,7 +65,13 @@ version = "7.7.1" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -68,12 +81,6 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[deps.BenchmarkTools]] -deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "f1dff6729bc61f4d49e140da1af55dcd1ac97b2f" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.5.0" - [[deps.BitFlags]] git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" @@ -81,21 +88,15 @@ version = "0.1.9" [[deps.CSV]] deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] -git-tree-sha1 = "6c834533dc1fabd820c1db03c839bf97e45a3fab" +git-tree-sha1 = "deddd8725e5e1cc49ee205a1964256043720a6c3" uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -version = "0.10.14" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" +version = "0.10.15" [[deps.Catch22]] -deps = ["DelimitedFiles", "DimensionalData", "Libdl", "LinearAlgebra", "Pkg", "ProgressLogging", "Reexport", "Requires", "Statistics", "TimeseriesFeatures", "catch22_jll"] -git-tree-sha1 = "e62cc37eb8afccc1112d71608ca0746e5e7ada4a" +deps = ["DelimitedFiles", "DimensionalData", "Libdl", "LinearAlgebra", "Pkg", "Reexport", "Requires", "Statistics", "TimeseriesFeatures", "catch22_jll"] +git-tree-sha1 = "94dfda2e7941e3acd4026477022fb2709fad68b9" uuid = "acdeb78f-3d39-4310-8fdf-6d75c17c6d5a" -version = "0.5.0" +version = "0.7.0" [[deps.CategoricalArrays]] deps = ["DataAPI", "Future", "Missings", "Printf", "Requires", "Statistics", "Unicode"] @@ -117,52 +118,63 @@ version = "0.10.8" [[deps.CodeTracking]] deps = ["InteractiveUtils", "UUIDs"] -git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386" +git-tree-sha1 = "980f01d6d3283b3dbdfd7ed89405f96b7256ad57" uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" -version = "1.3.5" +version = "2.0.1" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.5" +version = "0.7.8" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" +git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.5" +version = "0.12.1" + + [deps.ColorTypes.extensions] + StyledStringsExt = "StyledStrings" + + [deps.ColorTypes.weakdeps] + StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.18.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] CompatLinearAlgebraExt = "LinearAlgebra" +[[deps.Compiler]] +git-tree-sha1 = "382d79bfe72a406294faca39ef0c3cef6e6ce1f1" +uuid = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1" +version = "0.1.1" + [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.1.1+0" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" +git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.4.2" +version = "2.5.0" [[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.5" -weakdeps = ["IntervalSets", "StaticArrays"] +version = "1.6.0" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [deps.ConstructionBase.extensions] ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.Crayons]] @@ -176,22 +188,28 @@ uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" version = "1.16.0" [[deps.DataFrames]] -deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8" +deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "c967271c27a95160e30432e011b58f42cd7501b5" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.6.1" +version = "1.8.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.20" +version = "0.18.22" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" version = "1.0.0" +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -204,21 +222,39 @@ version = "1.9.1" [[deps.Dictionaries]] deps = ["Indexing", "Random", "Serialization"] -git-tree-sha1 = "1f3b7b0d321641c1f2e519f7aed77f8e1f6cb133" +git-tree-sha1 = "a86af9c4c4f33e16a2b2ff43c2113b2f390081fa" uuid = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4" -version = "0.3.29" +version = "0.4.5" [[deps.DimensionalData]] -deps = ["Adapt", "ArrayInterface", "ConstructionBase", "Dates", "Extents", "IntervalSets", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "PrecompileTools", "Random", "RecipesBase", "SparseArrays", "Statistics", "TableTraits", "Tables"] -git-tree-sha1 = "16ebad2fa5262cb9986406f7f90a7ff5082d98f7" +deps = ["Adapt", "ArrayInterface", "ConstructionBase", "DataAPI", "Dates", "Extents", "Interfaces", "IntervalSets", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "PrecompileTools", "Random", "RecipesBase", "Statistics", "TableTraits", "Tables"] +git-tree-sha1 = "b95dbd2110c6ad146085f67335f01bab30b70c92" uuid = "0703355e-b756-11e9-17c0-8b28908087d0" -version = "0.25.8" +version = "0.29.24" [deps.DimensionalData.extensions] + DimensionalDataAbstractFFTsExt = "AbstractFFTs" + DimensionalDataAlgebraOfGraphicsExt = "AlgebraOfGraphics" + DimensionalDataCategoricalArraysExt = "CategoricalArrays" + DimensionalDataChainRulesCoreExt = "ChainRulesCore" + DimensionalDataDiskArraysExt = "DiskArrays" DimensionalDataMakie = "Makie" + DimensionalDataNearestNeighborsExt = "NearestNeighbors" + DimensionalDataPythonCall = "PythonCall" + DimensionalDataSparseArraysExt = "SparseArrays" + DimensionalDataStatsBase = "StatsBase" [deps.DimensionalData.weakdeps] + AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" + AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67" + CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] @@ -226,9 +262,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "9c405847cc7ecda2dc921ccf18b47ca150d7317e" +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.109" +version = "0.25.120" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -241,59 +277,57 @@ version = "0.25.109" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" +version = "0.9.5" [[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] -git-tree-sha1 = "76deb8c15f37a3853f13ea2226b8f2577652de05" +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] +git-tree-sha1 = "47ffb8f27ffc01e2e57e7ae5365ae5ceef87b03d" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.5.0" +version = "1.14.1" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - [[deps.ExceptionUnwrapping]] deps = ["Test"] -git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.10" +version = "0.1.11" [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" +git-tree-sha1 = "7bb1361afdb33c7f2b085aa49ea8fe1b0fb14e58" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.6.2+0" +version = "2.7.1+0" [[deps.Extents]] -git-tree-sha1 = "94997910aca72897524d2237c41eb852153b0f65" +git-tree-sha1 = "b309b36a9e02fe7be71270dd8c0fd873625332b4" uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" -version = "0.1.3" +version = "0.1.6" [[deps.FilePathsBase]] -deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] -git-tree-sha1 = "9f00e42f8d99fdde64d40c8ea5d14269a2e2c1aa" +deps = ["Compat", "Dates"] +git-tree-sha1 = "3bab2c5aa25e7840a4b065805c0cdfc01f3068d2" uuid = "48062228-2e41-5def-b9a4-89aafe57970f" -version = "0.9.21" +version = "0.9.24" +weakdeps = ["Mmap", "Test"] + + [deps.FilePathsBase.extensions] + FilePathsBaseMmapExt = "Mmap" + FilePathsBaseTestExt = "Test" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra"] -git-tree-sha1 = "0653c0a2396a6da5bc4766c43041ef5fd3efbe57" +git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.11.0" +version = "1.14.0" weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] @@ -317,34 +351,40 @@ deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" +deps = ["Git_LFS_jll", "Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "824a1890086880696fc908fe12a17bcf61738bd8" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.1" +version = "1.5.0" + +[[deps.Git_LFS_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "bb8471f313ed941f299aa53d32a94ab3bee08844" +uuid = "020c3dae-16b3-5ae5-87b3-4cb189e250b2" +version = "3.7.0+0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "d18fb8a1f3609361ebda9bf029b60fd0f120c809" +git-tree-sha1 = "e2aef26f7d273f1e5b1daba56837c47b49b4388f" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.44.0+2" +version = "2.51.1+0" [[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" +deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "7a98c6502f4632dbe9fb1973a4244eaa3324e84d" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.2" +version = "1.13.1" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.8" +version = "1.10.17" [[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.23" +version = "0.3.28" [[deps.IOCapture]] deps = ["Logging", "Random"] @@ -363,25 +403,31 @@ uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" version = "0.1.5" [[deps.InlineStrings]] -deps = ["Parsers"] -git-tree-sha1 = "86356004f30f8e737eff143d57d41bd580e437aa" +git-tree-sha1 = "8f3d257792a522b4601c24a577954b0a8cd7334d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.1" +version = "1.4.5" [deps.InlineStrings.extensions] ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" [deps.InlineStrings.weakdeps] ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.Interfaces]] +git-tree-sha1 = "331ff37738aea1a3cf841ddf085442f31b84324f" +uuid = "85a1e053-f937-4924-92a5-1367d23b7b87" +version = "0.3.2" + [[deps.IntervalSets]] -git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.10" +version = "0.7.11" weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] @@ -390,20 +436,26 @@ weakdeps = ["Random", "RecipesBase", "Statistics"] IntervalSetsStatisticsExt = "Statistics" [[deps.InvertedIndices]] -git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" +git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe" uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -version = "1.3.0" +version = "1.3.1" [[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" +version = "0.2.4" [[deps.IterTools]] git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" version = "1.10.0" +[[deps.IterableTables]] +deps = ["DataValues", "IteratorInterfaceExtensions", "Requires", "TableTraits", "TableTraitsUtils"] +git-tree-sha1 = "70300b876b2cebde43ebc0df42bc8c94a144e1b4" +uuid = "1c8ee90f-4401-5389-894e-7a04a3dc0f4d" +version = "1.0.0" + [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" uuid = "82899510-4779-5014-852e-03e436cf321d" @@ -411,9 +463,9 @@ version = "1.0.0" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.7.1" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -423,19 +475,19 @@ version = "0.21.4" [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] -git-tree-sha1 = "a6adc2dcfe4187c40dc7c2c9d2128e326360e90a" +git-tree-sha1 = "d8337622fe53c05d16f031df24daf0270e53bc64" uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -version = "0.9.32" +version = "0.10.5" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LazilyInitializedFields]] -git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" +git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -version = "1.2.2" +version = "1.3.0" [[deps.Lazy]] deps = ["MacroTools"] @@ -454,9 +506,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -467,9 +524,9 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.18.0+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] @@ -477,9 +534,9 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.28" +version = "0.3.29" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -496,27 +553,26 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" +version = "1.1.0" [[deps.LoweredCodeUtils]] -deps = ["JuliaInterpreter"] -git-tree-sha1 = "eeaedcf337f33c039f9f3a209a8db992deefd7e9" +deps = ["CodeTracking", "Compiler", "JuliaInterpreter"] +git-tree-sha1 = "73b98709ad811a6f81d84e105f4f695c229385ba" uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -version = "2.4.8" +version = "3.4.3" [[deps.MLJModelInterface]] -deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] -git-tree-sha1 = "ceaff6618408d0e412619321ae43b33b40c1a733" +deps = ["InteractiveUtils", "REPL", "Random", "ScientificTypesBase", "StatisticalTraits"] +git-tree-sha1 = "ccaa3f7938890ee8042cc970ba275115428bd592" uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" -version = "1.11.0" +version = "1.12.0" [[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.13" +version = "0.5.16" [[deps.Markdown]] deps = ["Base64"] @@ -537,7 +593,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Missings]] deps = ["DataAPI"] @@ -550,19 +606,13 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.MultiData]] deps = ["CSV", "Catch22", "DataFrames", "DataStructures", "Logging", "MLJModelInterface", "Random", "Reexport", "Revise", "ScientificTypes", "SoleBase", "Statistics", "StatsBase", "Tables"] -git-tree-sha1 = "a823bea332abb7bb091d914e606ea0f25ba905f2" +git-tree-sha1 = "f10b2197c010852a313ae91d2d8b891829f51553" uuid = "8cc5100c-b3d1-4f82-90cb-0ea93d317aba" -version = "0.1.1" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" +version = "0.1.4" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -571,57 +621,63 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "1f2f0911e1c02f28a390bb720f97f3349c4dcefb" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.2+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.3" +version = "1.5.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a028ee3cb5641cccc4c24e90c36b0a4f7707bdf5" +git-tree-sha1 = "2ae7d4ddec2e13ad3bddf5c0796f7547cf682391" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.14+0" +version = "3.5.2+0" [[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" +version = "0.5.6+0" [[deps.OrderedCollections]] -git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.3" +version = "1.8.1" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+0" +version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.31" +version = "0.11.35" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.1" +version = "2.8.3" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -637,53 +693,67 @@ version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" +version = "1.5.0" [[deps.PrettyTables]] deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] -git-tree-sha1 = "66b20dd35966a748321d3b2537c4584cf40387c7" +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "2.3.2" +version = "2.4.0" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[deps.Profile]] -deps = ["Printf"] -uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" - [[deps.ProgressLogging]] deps = ["Logging", "SHA", "UUIDs"] -git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +git-tree-sha1 = "d95ed0324b0799843ac6f7a6a85e65fe4e5173f0" uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" -version = "0.1.4" +version = "0.1.5" [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] -git-tree-sha1 = "763a8ceb07833dd51bb9e3bbca372de32c0605ad" +git-tree-sha1 = "fbb92c6c56b34e1a2c4c36058f68f332bec840e7" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.10.0" +version = "1.11.0" [[deps.PtrArrays]] -git-tree-sha1 = "f011fbb92c4d401059b2212c05c0601b70f8b759" +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.2.0" +version = "1.3.0" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9b23c31e76e333e6fb4c1595ae6afa74966a729e" +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.9.4" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + +[[deps.Query]] +deps = ["DataValues", "IterableTables", "MacroTools", "QueryOperators", "Statistics"] +git-tree-sha1 = "a66aa7ca6f5c29f0e303ccef5c8bd55067df9bbe" +uuid = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1" +version = "1.0.0" + +[[deps.QueryOperators]] +deps = ["DataStructures", "DataValues", "IteratorInterfaceExtensions", "TableShowUtils"] +git-tree-sha1 = "911c64c204e7ecabfd1872eb93c49b4e7c701f02" +uuid = "2aef5ad7-51ca-5a8f-8e88-e75cf067b44b" +version = "0.9.3" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RecipesBase]] @@ -705,27 +775,31 @@ version = "0.1.0" [[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" +version = "1.3.1" [[deps.Revise]] -deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] -git-tree-sha1 = "85ddd93ea15dcd8493400600e09104a9e94bb18d" +deps = ["CodeTracking", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "d852eba0cc08181083a58d5eb9dccaec3129cb03" uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.5.15" +version = "3.9.0" +weakdeps = ["Distributed"] + + [deps.Revise.extensions] + DistributedExt = "Distributed" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.1" +version = "0.8.0" [[deps.Rmath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d483cd324ce5cf5d61b77930f0bbd6cb61927d21" +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.2+0" +version = "0.5.1+0" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -733,9 +807,9 @@ version = "0.7.0" [[deps.ScientificTypes]] deps = ["CategoricalArrays", "ColorTypes", "Dates", "Distributions", "PrettyTables", "Reexport", "ScientificTypesBase", "StatisticalTraits", "Tables"] -git-tree-sha1 = "75ccd10ca65b939dab03b812994e571bf1e3e1da" +git-tree-sha1 = "3ad7f09ae97806e86b3ef28cd50c52ca18bd2d80" uuid = "321657f4-b219-11e9-178b-2701a2544e81" -version = "3.0.2" +version = "3.1.1" [[deps.ScientificTypesBase]] git-tree-sha1 = "a8e18eb383b5ecf1b5e6fc237eb39255044fd92b" @@ -744,9 +818,9 @@ version = "3.0.0" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a" +git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.5" +version = "1.4.8" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -756,52 +830,53 @@ deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" [[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" +version = "1.2.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +git-tree-sha1 = "be8eeac05ec97d379347584fa9fe2f5f76795bcb" uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" +version = "0.9.5" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SoleBase]] deps = ["CategoricalArrays", "FillArrays", "IterTools", "Logging", "Random", "StatsBase"] -git-tree-sha1 = "6fbc897b527e0b06488072f265ade6fc172ed375" +git-tree-sha1 = "7125239f46cb1fdfe8b0988140a1511345856a1c" uuid = "4475fa32-7023-44a0-aa70-4813b230e492" -version = "0.12.3" +version = "0.13.3" [[deps.SoleData]] -deps = ["BenchmarkTools", "CSV", "Catch22", "CategoricalArrays", "DataFrames", "DataStructures", "Graphs", "HTTP", "Lazy", "LinearAlgebra", "Logging", "MLJModelInterface", "MultiData", "ProgressMeter", "Random", "Reexport", "Revise", "ScientificTypes", "SoleBase", "SoleLogics", "Statistics", "StatsBase", "Tables", "ThreadSafeDicts", "UniqueVectors", "ZipFile"] -git-tree-sha1 = "15e46a8947005441ff1ea52fef2c9ad7aa936e38" +deps = ["CategoricalArrays", "DataFrames", "DataStructures", "HTTP", "IntervalSets", "Lazy", "LinearAlgebra", "Logging", "MLJModelInterface", "MultiData", "ProgressMeter", "Query", "Random", "Reexport", "ScientificTypes", "SoleBase", "SoleLogics", "StatsBase", "Tables", "ThreadSafeDicts", "UniqueVectors", "ZipFile"] +git-tree-sha1 = "a50ed4870d07431a259b77d286ac102b04d8ddb7" uuid = "123f1ae1-6307-4526-ab5b-aab3a92a2b8c" -version = "0.15.0" +version = "0.16.3" [[deps.SoleLogics]] -deps = ["AbstractTrees", "DataStructures", "Dictionaries", "FunctionWrappers", "Graphs", "IterTools", "Lazy", "PrettyTables", "Random", "Reexport", "Revise", "SoleBase", "StatsBase", "ThreadSafeDicts"] -git-tree-sha1 = "af8e484a1cb78a849cd9a638206b322af2e312ce" +deps = ["AbstractTrees", "DataStructures", "Dictionaries", "FunctionWrappers", "Graphs", "IterTools", "Lazy", "PrettyTables", "Random", "Reexport", "SoleBase", "StaticArrays", "StatsBase", "ThreadSafeDicts"] +git-tree-sha1 = "224b4303c1b7bcff39128a86bcccd5890bbbf4d9" uuid = "b002da8f-3cb3-4d91-bbe3-2953433912b5" -version = "0.9.3" +version = "0.13.2" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" +git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.1" +version = "1.2.2" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "2f5d4697f21388cbe1ff299430dd169ef97d7e14" +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.4.0" +version = "2.5.1" [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -811,9 +886,9 @@ version = "2.4.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "b8693004b385c842357406e3af647701fe783f98" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.15" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -830,32 +905,32 @@ version = "1.4.3" [[deps.StatisticalTraits]] deps = ["ScientificTypesBase"] -git-tree-sha1 = "542d979f6e756f13f862aa00b224f04f9e445f11" +git-tree-sha1 = "89f86d9376acd18a1a4fbef66a56335a3a7633b8" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" -version = "3.4.0" +version = "3.5.0" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" +version = "1.7.1" [[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" +deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.3" +version = "0.34.6" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "cef0472124fab0695b58ca35a77c6fb942fdab8a" +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.1" +version = "1.5.0" [deps.StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" @@ -867,35 +942,47 @@ version = "1.3.1" [[deps.StringManipulation]] deps = ["PrecompileTools"] -git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" -version = "0.3.4" +version = "0.4.1" [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" version = "1.0.3" +[[deps.TableShowUtils]] +deps = ["DataValues", "Dates", "JSON", "Markdown", "Unicode"] +git-tree-sha1 = "2a41a3dedda21ed1184a47caab56ed9304e9a038" +uuid = "5e66a065-1f0a-5976-b372-e0b8c017ca10" +version = "0.2.6" + [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" +[[deps.TableTraitsUtils]] +deps = ["DataValues", "IteratorInterfaceExtensions", "Missings", "TableTraits"] +git-tree-sha1 = "78fecfe140d7abb480b53a44f3f85b6aa373c293" +uuid = "382cd787-c1b6-5bf2-a167-d5b971a19bda" +version = "1.0.2" + [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" +version = "1.12.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -912,24 +999,29 @@ uuid = "4239201d-c60e-5e0a-9702-85d713665ba7" version = "0.1.6" [[deps.TimeseriesFeatures]] -deps = ["DimensionalData", "LinearAlgebra", "ProgressLogging", "Reexport", "Requires", "Statistics"] -git-tree-sha1 = "a61ba9e95640dc98205a3e81fc31ab6a0a363e2c" +deps = ["DimensionalData", "LinearAlgebra", "ProgressLogging", "Requires", "Statistics"] +git-tree-sha1 = "6e6b0825e66f4e6486afe60a629c0baf21fd8bf8" uuid = "f3112013-b923-4dfa-b867-8806c885f823" -version = "0.4.1" +version = "0.6.1" + + [deps.TimeseriesFeatures.extensions] + StatsBaseExt = ["StatsBase"] + TimeseriesToolsExt = ["TimeseriesTools", "StatsBase"] + + [deps.TimeseriesFeatures.weakdeps] + Associations = "614afb3a-e278-4863-8805-9959372b9ec2" + StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" + TimeseriesTools = "380cddd1-6ef2-46ca-b087-e7151fb095ff" [[deps.TranscodingStreams]] -git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.0" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] +version = "0.11.3" [[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" +version = "1.6.1" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -963,18 +1055,18 @@ version = "0.10.1" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.catch22_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "7cfb827b3f62e20de3ccebaabf468ea979d098d9" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c32bf35b047a81b13d54aad1d3cf59a1c2c66eb6" uuid = "8a07c0c5-99ad-56cb-bc82-72eed1bb61ce" -version = "0.4.0+0" +version = "0.5.0+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.11.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -984,4 +1076,4 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" diff --git a/ext/SoleDataViz b/ext/SoleDataViz new file mode 100644 index 00000000..37dcd165 --- /dev/null +++ b/ext/SoleDataViz @@ -0,0 +1,108 @@ +module SoleDataViz + +using SoleData +using GLMakie, GeometryBasics + +""" + plot_scalardnf(formula; kwargs...)::GLMakie.Figure + +Plot a 3D voxel visualization of a scalar DNF formula. Each disjunct is represented as a separate layer, with variables on the x-axis and threshold intervals on the y-axis. + +# Keyword Arguments +- `show_all_variables`: Whether to show all variables (default: false) +- `palette`: Color palette for different variables (default: [:cyan, :green, :yellow, :magenta, :blue]) +- `body_char`: Character for body representation (default: =) +- `gap`: Gap between voxels (default: 0.0) +- `scale`: 3D scaling vector (default: Vec3f(1.0, 1.0, 0.5)) +- `show_axes`: Whether to show axis labels and ticks (default: true) +- `title`: Optional title for the plot (default: nothing) + +# Returns +- `Figure`: A GLMakie figure containing the 3D voxel plot +""" +function plot_scalardnf( + formula::DNF; + show_all_variables::Bool = false, + palette::Vector{Symbol} = [:cyan, :green, :yellow, :magenta, :blue], + body_char::Char = '=', # alternatives: ■, ━ + gap::Real = 0.0, + scale::Vec3f = Vec3f(1.0, 1.0, 0.5), + show_axes::Bool = true, + title::Union{String, Nothing} = nothing, +)::GLMakie.Figure + # Normalize the formula to ensure consistent representation + formula = normalize(formula) + disjs = SoleLogics.disjuncts(formula) + + # Extract intervals for each disjunct + all_intervals = [extract_intervals(d) for d in disjs] + + # Gather all unique variables across all disjuncts + all_vars = Set{Any}() + for intervals in all_intervals, v in keys(intervals) + push!(all_vars, v) + end + all_vars = sort(collect(all_vars)) + + # Collect all threshold values for consistent axis scaling + all_thresholds = collect_thresholds(all_intervals) + + # Create 3D cube: (variables, threshold_segments, disjuncts) + cube = fill(false, (length(all_vars), length(all_thresholds) - 1, length(disjs))) + + # Fill the cube with interval data for each disjunct + for (i, (d, intervals)) in enumerate(zip(disjs, all_intervals)) + for (j, var) in enumerate(all_vars) + if !haskey(intervals, var) + # Variable not present in this disjunct + continue + end + + interval = intervals[var] + segmenttypes, first_idx, last_idx = SoleData.compute_segmenttypes(interval, all_thresholds) + # Mark segments as active (true) where the interval is satisfied + cube[j, :, i] = map(x -> x.full, segmenttypes) + end + end + + # Create the 3D plot + fig = Figure() + ax = LScene(fig[1, 1], scenekw = (camera = cam3d!,)) + + # Create color mapping: each variable gets a unique color + color_index = [x for x in 1:size(cube, 1), y in 1:size(cube, 2), z in 1:size(cube, 3)] + color_data = ifelse.(cube, color_index, NaN) + + # Plot the voxels + voxels!(ax, + 0 .. (size(cube, 1)-1), + 0 .. (size(cube, 2)-1), + 0 .. (size(cube, 3)-1), + color_data; + colormap = palette, + colorrange = (1, length(palette)), + gap + ) + + # Add axis labels and formatting + if show_axes + ax.xlabel = "Variables" + ax.ylabel = "Threshold Segments" + ax.zlabel = "Disjuncts" + + # Set variable names as x-axis ticks + ax.xticks = (0:length(all_vars)-1, [string(v) for v in all_vars]) + + # Set disjunct numbers as z-axis ticks + ax.zticks = (0:length(disjs)-1, [string(i) for i in 1:length(disjs)]) + end + + # Add title if provided + if !isnothing(title) + fig[0, 1] = Label(fig, title, fontsize = 16) + end + + fig +end + +end diff --git a/src/SoleData.jl b/src/SoleData.jl index b6d1529c..84624292 100644 --- a/src/SoleData.jl +++ b/src/SoleData.jl @@ -150,6 +150,10 @@ include("utils/multilogiset.jl") export @scalarformula +module IntervalSetsWrap +using IntervalSets +end + include("scalar/main.jl") export initlogiset, ninstances, maxchannelsize, worldtype, dimensionality, allworlds, featvalue diff --git a/src/minimize.jl b/src/minimize.jl index 1329bedd..5addb14a 100644 --- a/src/minimize.jl +++ b/src/minimize.jl @@ -3,7 +3,7 @@ using Downloads # only for paper using Tar # OLD ################### -using SoleData.Artifacts:load,MITESPRESSOLoader,ABCLoader +using SoleData.Artifacts: load, MITESPRESSOLoader, ABCLoader """ espresso_minimize( diff --git a/src/scalar/conditions.jl b/src/scalar/conditions.jl index 4f245e28..5449189b 100644 --- a/src/scalar/conditions.jl +++ b/src/scalar/conditions.jl @@ -674,10 +674,6 @@ function _rangescalarcond_to_scalarconds_in_conjunction(cond) conds end -module IntervalSetsWrap -using IntervalSets: Interval -end - # function myisless(a::Number, aismin::Bool, b::Number, bismin::Bool) # return a < b # end diff --git a/src/scalar/main.jl b/src/scalar/main.jl index bb143087..3bec88a5 100644 --- a/src/scalar/main.jl +++ b/src/scalar/main.jl @@ -17,6 +17,8 @@ include("random.jl") include("representatives.jl") +include("visualizations.jl") + # # Types for representing common associations between features and operators # include("canonical-conditions.jl") # TODO remove diff --git a/src/scalar/var-features.jl b/src/scalar/var-features.jl index 89c7c4dd..c68220cb 100644 --- a/src/scalar/var-features.jl +++ b/src/scalar/var-features.jl @@ -2,7 +2,7 @@ import SoleData: AbstractFeature using MultiData: instance_channel -import Base: show +import Base: show, isless import SoleLogics: syntaxstring # Feature parentheses (e.g., for parsing/showing "main[V2]") @@ -301,6 +301,8 @@ struct VariableValue{I<:VariableId, N<:Union{VariableName, Nothing}} <: Abstract end featurename(f::VariableValue) = !isnothing(f.i_name) ? f.i_name : "" +Base.isless(a::VariableValue, b::VariableValue) = isless(a.i_variable, b.i_variable) + function syntaxstring(f::VariableValue; variable_names_map = nothing, show_colon = false, kwargs...) if !isnothing(f.i_name) opening_parenthesis = UVF_OPENING_PARENTHESIS diff --git a/src/scalar/visualizations.jl b/src/scalar/visualizations.jl new file mode 100644 index 00000000..b2dd1022 --- /dev/null +++ b/src/scalar/visualizations.jl @@ -0,0 +1,412 @@ +""" + Scalar DNF Formula Visualization Module + +This module provides functionality for creating graphical representations of +Normal Form scalar formulas (e.g., DNF) using interval-based visualizations. +""" + +export show_scalardnf + +using Printf: @sprintf +using SoleData: AbstractScalarCondition + +using .IntervalSetsWrap: infimum, supremum, isleftopen, isrightopen + +# ============================================================================================ +# Interval Extraction Functions +# ============================================================================================ + +""" + extract_intervals(formula::LeftmostConjunctiveForm{<:Atom}) -> Dict{Any, IntervalSetsWrap.Interval} + extract_intervals(formula::LeftmostDisjunctiveForm{<:Atom}) -> Dict{Any, IntervalSetsWrap.Interval} + +Extract interval constraints for each variable from a scalar conjunction/disjunction. + +This function handles both conjunctive and disjunctive forms: +- For conjunctions, constraints on the same variable are intersected (AND operation) +- For disjunctions, constraints on the same variable are unioned (OR operation) + +Returns a dictionary mapping each feature/variable to its constraint interval. + +# Examples +```julia +extract_intervals(@scalarformula (V1 ≥ 2.0) ∧ (V1 < 5.0) ∧ (V2 > 1.0)) +# Returns: Dict(V1 => [2.0, 5.0), V2 => (1.0, +∞)) + +extract_intervals(@scalarformula (V1 < 3.0) ∨ (V1 > 7.0)) +# Returns: Dict(V1 => (-∞, 3.0) ∪ (7.0, +∞)) +``` +""" +function extract_intervals(conjunction::LeftmostConjunctiveForm)::Dict{Any, IntervalSetsWrap.Interval} + _extract_intervals(SoleLogics.conjuncts(conjunction), true) +end + +function extract_intervals(disjunction::LeftmostDisjunctiveForm)::Dict{Any, IntervalSetsWrap.Interval} + _extract_intervals(SoleLogics.disjuncts(disjunction), false) +end + +""" +This function processes each atom by: +1. Extracting the scalar condition and its associated feature +2. Converting the condition to an interval representation +3. Combining intervals for the same variable according to the polarity: + - `polarity=true`: Intersection (∩) for conjunctions + - `polarity=false`: Union (∪) for disjunctions +""" +function _extract_intervals(atoms::Vector, polarity::Bool)::Dict{Any, IntervalSetsWrap.Interval} + by_var = Dict{Any, IntervalSetsWrap.Interval}() + + for atom in atoms + @assert atom isa Atom "Cannot handle non-Atom leaves; got $(typeof(atom)) instead." + + # Extract the scalar condition from the atom + cond = SoleLogics.value(atom) + @assert cond isa AbstractScalarCondition typeof(cond) + + # Get the feature (variable) and convert condition to interval + feat = SoleData.feature(cond) + interval = tointervalset(cond) + + # Combine intervals for the same variable + by_var[feat] = if haskey(by_var, feat) + if polarity + # Conjunction: intersect intervals (both conditions must hold) + by_var[feat] ∩ interval + else + # Disjunction: union intervals (either condition can hold) + by_var[feat] ∪ interval + end + else + # First time seeing this variable + interval + end + end + by_var +end + +# ============================================================================================ +# Threshold Collection and Processing +# ============================================================================================ + +# Collect and sort all unique threshold values from interval boundaries. +function collect_thresholds(all_intervals::Vector{Dict{Any, IntervalSetsWrap.Interval}})::Vector{Any} + thresholds = Set{Number}() + + # Collect all interval boundaries + for intervals in all_intervals + for interval in values(intervals) + push!(thresholds, infimum(interval)) # Lower bound + push!(thresholds, supremum(interval)) # Upper bound + end + end + + sort(collect(thresholds)) +end + +# ============================================================================================ +# Interval Type and Segment Processing +# ============================================================================================ + +""" + IntervalType + +Mutable structure representing the boundary properties of an interval segment. + +# Fields +- `left_closed::Bool`: Whether the left boundary is closed (inclusive) +- `full::Bool`: Whether this segment is fully covered by the interval +- `right_closed::Bool`: Whether the right boundary is closed (inclusive) + +This structure is used to track how interval boundaries map to visualization segments, +determining whether to draw '[' or '(' for left boundaries and ']' or ')' for right boundaries. +""" +mutable struct IntervalType + left_closed::Bool # Whether left boundary uses '[' (closed) or '(' (open) + full::Bool # Whether this segment should be filled + right_closed::Bool # Whether right boundary uses ']' (closed) or ')' (open) +end + +""" + compute_segmenttypes(interval, thresholds) -> (Vector{IntervalType}, Union{Int,Nothing}, Union{Int,Nothing}) + +Compute how an interval maps to visualization segments defined by threshold values. + +This function determines which segments between consecutive thresholds are covered +by the given interval and how the interval boundaries should be displayed. + +# Arguments +- `interval`: An interval object with infimum, supremum, and boundary type information +- `thresholds`: Sorted vector of threshold values defining segment boundaries + +# Returns +- `Vector{IntervalType}`: Array describing the visual properties of each segment +- `Union{Int,Nothing}`: Index of first non-empty segment (for left boundary marker) +- `Union{Int,Nothing}`: Index of last non-empty segment (for right boundary marker) + +# Algorithm +1. Extract interval bounds and boundary types (open/closed) +2. For each segment between consecutive thresholds, determine if it intersects the interval +3. Mark segments as full/empty and set appropriate boundary markers +4. Handle open vs closed boundaries by adjusting the first and last segment markers +""" +function compute_segmenttypes(interval, thresholds) + # Extract interval properties + (minv, mini, maxv, maxi) = ( + infimum(interval), # Lower bound value + !isleftopen(interval), # Is left boundary closed? + supremum(interval), # Upper bound value + !isrightopen(interval) # Is right boundary closed? + ) + + nseg = length(thresholds) - 1 + + # Determine which segments are non-empty (intersect with the interval) + isnonempty = [begin + t0 = thresholds[i] # Left threshold of segment + t1 = thresholds[i+1] # Right threshold of segment + + # Segment intersects interval if interval doesn't end before segment starts + # or start after segment ends + if maxv <= t0 || minv >= t1 + false + else + true + end + end for i in 1:nseg] + + # Initialize all segments: non-empty segments are marked as full and closed + segmenttypes = map(nonempty -> IntervalType(nonempty, nonempty, nonempty), isnonempty) + + # Find the first and last non-empty segments for boundary markers + first_idx = findfirst(identity, isnonempty) + last_idx = findlast(identity, isnonempty) + + # Adjust boundary markers for open intervals + if !mini && first_idx !== nothing + # Left boundary is open: use '(' instead of '[' + segmenttypes[first_idx].left_closed = false + end + if !maxi && last_idx !== nothing + # Right boundary is open: use ')' instead of ']' + segmenttypes[last_idx].right_closed = false + end + + segmenttypes, first_idx, last_idx +end + +# ============================================================================================ +# Bar Drawing and Visualization +# ============================================================================================ + +""" + draw_bar(segmenttypes, first_idx, last_idx; colwidth=5, body_char="=") -> String + +Generate ASCII art representation of an interval as a horizontal bar. + +# Examples +```julia +# For an interval [2.0, 5.0) across thresholds [0, 2, 3, 5, 7]: +# Returns: " [==========) " +# ^ ^ ^ ^ ^ +# [0,2] [2,3] [3,5] [5,7] +``` +""" +function draw_bar(segmenttypes, first_idx, last_idx; colwidth=5, body_char="=") + # Initialize all segments as empty spaces + segments_str = fill(" " ^ colwidth, length(segmenttypes)) + + # Fill segments that are covered by the interval + for i in 1:length(segmenttypes) + if segmenttypes[i].full + segments_str[i] = body_char ^ colwidth + end + end + + # Add left boundary marker + if !isnothing(first_idx) + segments_str[first_idx] = let x = collect(segments_str[first_idx]) + x[1] = (segmenttypes[first_idx].left_closed ? '[' : '(') + String(x) + end + end + + # Add right boundary marker + if !isnothing(last_idx) + segments_str[last_idx] = let x = collect(segments_str[last_idx]) + x[colwidth] = (segmenttypes[last_idx].right_closed ? ']' : ')') + String(x) + end + end + + # Add leading space and join all segments + " " ^ colwidth * join(segments_str) +end + +# ============================================================================================ +# Main Visualization Functions +# ============================================================================================ + + +""" + show_scalardnf(io::IO, formula::DNF; kwargs...) + show_scalardnf(formula::DNF; kwargs...) + +Create and display a graphical representation of a scalar DNF formula. + +This function generates an ASCII art visualization showing how each variable's +constraints are satisfied across different threshold ranges. Each disjunct +in the DNF is shown separately, with variables displayed as horizontal bars +indicating their valid ranges. + +# Arguments +- `io::IO`: Output stream to write the visualization +- `formula::DNF`: The scalar DNF formula to visualize + +# Keyword Arguments +- `show_all_variables::Bool = false`: Whether to display variables with infinite ranges (always-true constraints) +- `print_disjunct_nrs::Bool = false`: Whether to print disjunct numbers and formulas +- `palette::Vector = [:cyan, :green, :yellow, :magenta, :blue]`: Colors for different variables +- `colwidth::Int = 5`: Width of each threshold column (minimum 5) +- `body_char::Char = '='`: Character used to fill interval bars (alternatives: '■', '━') + +# Visualization Format + +The output consists of: +1. **Header**: Threshold values aligned with columns +2. **Disjunct sections**: Each disjunct shown separately with: + - Optional disjunct number and formula (if `print_disjunct_nrs=true`) + - Variable bars showing constraint ranges + - Color coding for different variables + +# Examples + +```julia +f = @scalarformula( + ((V1 < 5.85) ∧ (V1 ≥ 5.65) ∧ (V2 < 2.85)) ∨ + ((V1 < 5.3) ∧ (V2 ≥ 2.85)) +) |> dnf + +show_scalardnf(f; colwidth=6) +# Output: +# -Inf 2.85 5.30 5.65 5.85 Inf +# +# V1 : [===) +# V2 : [===) +# +# V1 : [==========) +# V2 : [================] + +show_scalardnf(f; print_disjunct_nrs=true, body_char='■') +# Shows disjunct formulas and uses ■ for bars +``` + +# Extended Help + +The algorithm is as follows: + +1. **Normalization**: Normalize the input formula +2. **Interval extraction**: Convert each disjunct to variable intervals +3. **Threshold collection**: Gather all interval boundaries +4. **Grid setup**: Create column layout based on thresholds +5. **Visualization**: For each disjunct and variable: + - Compute segment coverage + - Draw interval bar with appropriate boundaries + - Apply color coding + - Output formatted result + +Notes: + +- Variables with infinite ranges ((-∞, +∞)) are hidden unless `show_all_variables=true` +- Interval boundaries are shown as '[' (closed) or '(' (open) on the left, + and ']' (closed) or ')' (open) on the right +- Colors cycle through the palette for variables +- The `colwidth` must be at least 5 to accommodate boundary markers +""" +show_scalardnf(f::DNF; kwargs...) = show_scalardnf(stdout, f; kwargs...) + +function show_scalardnf( + io::IO, + formula::DNF; + show_all_variables=false, + print_disjunct_nrs=false, + palette=[:cyan, :green, :yellow, :magenta, :blue], + colwidth=5, + body_char='=', # alternatives: ■, ━ +) + @assert colwidth >= 5 "Column width must be at least 5 to accommodate boundary markers." + + # Normalize the formula for consistent processing + formula = normalize(formula) + disjs = SoleLogics.disjuncts(formula) + + # Extract interval constraints for each disjunct + all_intervals = [extract_intervals(d) for d in disjs] + + # Collect all variables mentioned in any disjunct + all_vars = Set{Any}() + for intervals in all_intervals, v in keys(intervals) + push!(all_vars, v) + end + all_vars = sort(collect(all_vars)) + + # Collect all threshold values for the grid + all_thresholds = collect_thresholds(all_intervals) + + # Calculate layout parameters + namewidth = maximum(length(syntaxstring(v)) for v in all_vars) + + # Generate and print header with threshold values + header = " " ^ (3 + colwidth + namewidth) # Space for variable names and separators + for t in all_thresholds + header *= @sprintf("%-*.*f", colwidth, 2, t) + end + println(io, header) + println(io) # Empty line after header + + # Assign colors to variables (cycling through palette) + var_colors = Dict{Any,Symbol}() + for (i, v) in enumerate(all_vars) + var_colors[v] = get(var_colors, v, palette[(i-1) % length(palette) + 1]) + end + + # Process and display each disjunct + for (i, (d, intervals)) in enumerate(zip(disjs, all_intervals)) + # Optional disjunct header + print_disjunct_nrs && println(io, "Disjunct $i: ", syntaxstring(normalize(d))) + + # Display each variable's constraints in this disjunct + for v in all_vars + # Determine the interval for this variable in this disjunct + if !haskey(intervals, v) + if show_all_variables + # Variable is unconstrained (always true) + interval = IntervalSetsWrap.Interval(-Inf, Inf) + else + # Skip unconstrained variables + continue + end + else + interval = intervals[v] + end + + # Skip infinite intervals unless explicitly requested + if interval == IntervalSetsWrap.Interval(-Inf, Inf) && !show_all_variables + continue + end + + # Compute how this interval maps to the visualization segments + segmenttypes, first_idx, last_idx = compute_segmenttypes(interval, all_thresholds) + + # Generate the bar representation + bar = draw_bar(segmenttypes, first_idx, last_idx; colwidth, body_char) + + # Output the variable name and colored bar + color = var_colors[v] + print(io, " ") # Indentation + printstyled(io, rpad(syntaxstring(v), namewidth), " : ", bar, color=color) + println(io) + end + println(io) # Empty line between disjuncts + end +end + diff --git a/test/artifacts.jl b/test/artifacts.jl index 7457626e..88e06ab4 100644 --- a/test/artifacts.jl +++ b/test/artifacts.jl @@ -1,4 +1,5 @@ using SoleData.Artifacts +using SoleData.Artifacts: load # fill your Artifacts.toml file; @test_nowarn fillartifacts() diff --git a/test/runtests.jl b/test/runtests.jl index 01c5284d..c531a975 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -39,7 +39,8 @@ test_suites = [ ("Conditions", [ "range-scalar-condition.jl", ]), ("Alphabets", [ "scalar-alphabet.jl", "discretization.jl"]), ("Features", [ "var-features.jl", "patchedfeatures.jl" ]), - # + ("Visualizations", [ "visualizations.jl", ]), + # ("MLJ", [ "MLJ.jl", ]), ("PLA", [ "pla.jl", ]), ("Minify", ["minify.jl"]), diff --git a/test/visualizations.jl b/test/visualizations.jl new file mode 100644 index 00000000..e1458d61 --- /dev/null +++ b/test/visualizations.jl @@ -0,0 +1,64 @@ +using SoleData + +@testset "Scalar DNF Visualizations" begin + + # Create a test formula with multiple disjuncts and overlapping constraints + test_formula = @scalarformula( + ((V1 < 5.85) ∧ (V1 ≥ 5.65) ∧ (V2 < 2.85) ∧ (V3 < 4.55) ∧ (V3 ≥ 4.45)) ∨ + ((V1 < 5.3) ∧ (V2 ≥ 2.85) ∧ (V3 < 5.05) ∧ (V3 ≥ 4.85) ∧ (V4 < 0.35)) + ) |> dnf + + check_same(a, b) = myclean(a) == myclean(b) + function myclean(s) + lines = collect(split(s, '\n')) + join(filter(x->x != "", map(x -> rstrip(x), lines)), "\n") + end + + @test myclean( + begin + io = IOBuffer() + show_scalardnf( + io, + test_formula; + colwidth=6, + ) + String(take!(io)) + end) == myclean(" + -Inf 0.35 2.85 4.45 4.55 4.85 5.05 5.30 5.65 5.85 Inf + + V1 : [====) + V2 : [==========) + V3 : [====) + + V1 : [========================================) + V2 : [==============================================] + V3 : [====) + V4 : [====) + ") + + @test myclean( + begin + io = IOBuffer() + show_scalardnf( + io, + test_formula; + show_all_variables=true, + colwidth=6, + ) + String(take!(io)) + end) == myclean(" + -Inf 0.35 2.85 4.45 4.55 4.85 5.05 5.30 5.65 5.85 Inf + + V1 : [====) + V2 : [==========) + V3 : [====) + V4 : [==========================================================] + + V1 : [========================================) + V2 : [==============================================] + V3 : [====) + V4 : [====) + + ") + +end \ No newline at end of file