Skip to content

Commit 902e347

Browse files
committed
Remove Real requirements from additional functions
1 parent 692987f commit 902e347

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/EquationUtils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function is_constant(tree::Node)::Bool
7070
end
7171

7272
# Get all the constants from a tree
73-
function get_constants(tree::Node{T})::AbstractVector{T} where {T<:Real}
73+
function get_constants(tree::Node{T})::AbstractVector{T} where {T}
7474
if tree.degree == 0
7575
if tree.constant
7676
return [tree.val]
@@ -86,7 +86,7 @@ function get_constants(tree::Node{T})::AbstractVector{T} where {T<:Real}
8686
end
8787

8888
# Set all the constants inside a tree
89-
function set_constants(tree::Node{T}, constants::AbstractVector{T}) where {T<:Real}
89+
function set_constants(tree::Node{T}, constants::AbstractVector{T}) where {T}
9090
if tree.degree == 0
9191
if tree.constant
9292
tree.val = constants[1]

src/SimplifyEquation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function simplify_tree(
103103
tree::Node{T},
104104
operators::AbstractOperatorEnum,
105105
id_map::IdDict{Node{T},Node{T}}=IdDict{Node{T},Node{T}}(),
106-
)::Node{T} where {T<:Real}
106+
)::Node{T} where {T}
107107
get!(id_map, tree) do
108108
if tree.degree == 1
109109
tree.l = simplify_tree(tree.l, operators, id_map)

0 commit comments

Comments
 (0)