Skip to content

Commit

Permalink
Merge branch 'dev' into ejd/inference
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Oct 30, 2023
2 parents 2fb70f1 + d559533 commit 2cc9515
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
@@ -1,5 +1,7 @@
# NEWS

- v0.4.23
- Fix type warnings
- v0.4.22
- Bug fixes
- update to use Graphs.jl
Expand Down
10 changes: 5 additions & 5 deletions src/Interface.jl
Expand Up @@ -328,7 +328,7 @@ function createbranch! end
error("Tree does not have an available destination node called " *
_getnodename(tree, dn))
sn dn || error("Branch must connect different nodes")

return ismissing(data) ?
_createbranch!(tree, sn, dn, len, name) :
_createbranch!(tree, sn, dn, len, name, data)
Expand All @@ -348,7 +348,7 @@ end
error("Tree does not have an available destination node called " *
_getnodename(tree, dst))
src dst || error("Branch must connect different nodes")

return ismissing(data) ?
_createbranch!(tree, src, dst, len, name) :
_createbranch!(tree, src, dst, len, name, data)
Expand All @@ -371,7 +371,7 @@ end
error("Tree does not have an available destination node called " *
_getnodename(tree, dn))
sn dn || error("Branch must connect different nodes")

return ismissing(data) ?
_createbranch!(tree, sn, dn, len, name) :
_createbranch!(tree, sn, dn, len, name, data)
Expand All @@ -392,7 +392,7 @@ end
error("Tree does not have an available destination node called " *
_getnodename(tree, dst))
src dst || error("Branch must connect different nodes")

return ismissing(data) ?
_createbranch!(tree, src, dst, len, name) :
_createbranch!(tree, src, dst, len, name, data)
Expand Down Expand Up @@ -644,7 +644,7 @@ function isleaf end
end
@traitfn function isleaf(tree::T, node::N) where
{T <: AbstractTree{OneTree}, N; MatchNodeType{T, N}}
_hasnode(tree, node) || error("Node $node does not exist")
_hasnode(tree, node) || error("Node $node does not exist")
return _isleaf(tree, node)
end

Expand Down
2 changes: 1 addition & 1 deletion src/Tree.jl
Expand Up @@ -7,7 +7,7 @@ abstract type AbstractBranchTree{RT, N, B, LI, ND} <:
end

import Phylo.API: _hasinbound
function _hasinbound(tree::AbstractBranchTree{<: Rooted}, name::String)
function _hasinbound(tree::AbstractBranchTree{<: Rooted}, name::String)
return tree.nodes[name].inbound !== nothing
end

Expand Down
8 changes: 4 additions & 4 deletions src/plot.jl
Expand Up @@ -293,10 +293,10 @@ end
"""
map_depthfirst(FUN, start, tree, eltype = nothing)
Apply `FUN` to each node in `tree` in depth-first order, and return the result.
`FUN` must take two arguments, `val` and `node`, where `val` is the result of
applying `FUN` to the previous node, and `node` is the current node. `start`
specifies the initial value of `val`, and `eltype` specifies the type of the
Apply `FUN` to each node in `tree` in depth-first order, and return the result.
`FUN` must take two arguments, `val` and `node`, where `val` is the result of
applying `FUN` to the previous node, and `node` is the current node. `start`
specifies the initial value of `val`, and `eltype` specifies the type of the
return value of `FUN`.
### Examples
Expand Down

0 comments on commit 2cc9515

Please sign in to comment.