From d0cfcd525bbfed8997bc1dbe7323c3ea95e345b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Sat, 28 Oct 2023 10:54:08 +0200 Subject: [PATCH] Remove `ImmutableArrays` dependency --- Project.toml | 2 -- src/EinExpr.jl | 3 +-- src/Optimizers/Exhaustive.jl | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index e7ca3a9..0d604f2 100644 --- a/Project.toml +++ b/Project.toml @@ -9,7 +9,6 @@ Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" -ImmutableArrays = "667c17eb-ab9b-4487-935f-1c621bb82497" Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826" [weakdeps] @@ -29,7 +28,6 @@ DataStructures = "0.18" FiniteDifferences = "0.12" GraphMakie = "0.5" Graphs = "1.6" -ImmutableArrays = "1.0.1" Makie = "0.19" Memoize = "0.4" julia = "1.9" diff --git a/src/EinExpr.jl b/src/EinExpr.jl index 32bf4ec..f9127ba 100644 --- a/src/EinExpr.jl +++ b/src/EinExpr.jl @@ -1,10 +1,9 @@ using Base: AbstractVecOrTuple using DataStructures: DefaultDict -using ImmutableArrays using AbstractTrees struct EinExpr - head::ImmutableVector{Symbol,Vector{Symbol}} + head::Vector{Symbol} args::Vector{EinExpr} size::Dict{Symbol,Int} diff --git a/src/Optimizers/Exhaustive.jl b/src/Optimizers/Exhaustive.jl index 7d0a2aa..ea3591c 100644 --- a/src/Optimizers/Exhaustive.jl +++ b/src/Optimizers/Exhaustive.jl @@ -27,7 +27,7 @@ function einexpr(config::Exhaustive, path; cost = BigInt(0)) path = einexpr(Naive(), path), cost = mapreduce(config.metric, +, Branches(einexpr(Naive(), path), inverse = true), init = BigInt(0))::BigInt, )) - cache = Dict{ImmutableVector{Symbol,Vector{Symbol}},BigInt}() + cache = Dict{Vector{Symbol},BigInt}() __einexpr_exhaustive_it(path, cost, config.metric, config.outer, leader, cache) return leader[].path end