Skip to content

Commit

Permalink
Add deleteat!
Browse files Browse the repository at this point in the history
  • Loading branch information
jangevaare committed Mar 1, 2017
1 parent 08efebb commit 338ed05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/PhyloModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import
Base.getindex,
Base.rand,
Base.copy,
Base.deleteat!,
StatsBase.loglikelihood

export
Expand Down
8 changes: 8 additions & 0 deletions src/sandbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ function append!(trace1::PhyloTrace, trace2::PhyloTrace)
end


function deleteat!(trace::PhyloTrace, inds)
deleteat!(trace.substitutionmodel, inds)
deleteat!(trace.tree, inds)
deleteat!(trace.logposterior, inds)
return trace
end


function length(x::PhyloTrace)
return length(x.substitutionmodel)
end
Expand Down

0 comments on commit 338ed05

Please sign in to comment.