Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 create rooted phylo tree struct and impl generic rooted tree traits #6

Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
65ab5ae
swtiched the outputs of get methods to refs
sriram98v Oct 14, 2023
e153a1b
renamed rooted tree struct, implemented get_root, get_nodes, get_chil…
sriram98v Oct 14, 2023
17fb6f3
added comments to traits, renamed distance matrix method
sriram98v Oct 15, 2023
0dcfb6a
implemented node iterators, removed data field in tree struct, implem…
sriram98v Oct 15, 2023
315f61c
added get_cluster trait, implemented get_cluster and get_bipartition
sriram98v Oct 15, 2023
60ebcf8
fixed bipartition implementation
sriram98v Oct 15, 2023
d16aa15
added method to get tree from newick string
sriram98v Oct 16, 2023
66ca88a
added unrooted tree struct
sriram98v Oct 16, 2023
9ab0ee3
moved leaves from HashSet to HashMap
sriram98v Oct 16, 2023
b473d2b
added preorder ancestor iterator
sriram98v Oct 17, 2023
fbce887
simple mrca implemented
sriram98v Oct 17, 2023
20dc054
switched to Vec instead of Hashset for children, added method to inse…
sriram98v Oct 17, 2023
6ddc242
added reroot at edge
sriram98v Oct 17, 2023
3610dba
removed empty line
sriram98v Oct 17, 2023
788b636
Updated the tree structure to have HashSet(Node) and distance matrix
swagle8987 Oct 17, 2023
c7175c8
Added newick reader
swagle8987 Oct 17, 2023
cf0ce30
Merge remote-tracking branch 'refs/remotes/origin/2-create-rooted-phy…
swagle8987 Oct 17, 2023
d5a9b7c
switched from Hashset to Vec for children
sriram98v Oct 18, 2023
f38db88
switched to dbg! macro, modified add_node and from_newick
sriram98v Oct 18, 2023
7b6a3d4
added new methods with default implementations to tree trait (get_nod…
sriram98v Oct 19, 2023
d5e9686
updated output type of edge iterator
sriram98v Oct 19, 2023
5c6d4c3
adding weighted tree parsing
sriram98v Oct 20, 2023
a3bd6a6
changing newick string iterator
sriram98v Oct 20, 2023
b13faee
Revert "updated output type of edge iterator"
sriram98v Oct 21, 2023
a79b073
Revert "added new methods with default implementations to tree trait …
sriram98v Oct 21, 2023
0f7435b
updated trait methods for tree, added from newick weighted tree support
sriram98v Oct 21, 2023
0ba768b
implemented to_newick
sriram98v Oct 21, 2023
02c762f
added method to split edge, distance from root
sriram98v Oct 23, 2023
b57e585
removed unused import
sriram98v Oct 23, 2023
01a5e3b
implemented methods distance_from ancestor, distance from rootm dista…
sriram98v Oct 23, 2023
8926595
implemented post order edges
sriram98v Oct 23, 2023
6b28751
added methods to get each field of tree
sriram98v Oct 23, 2023
97478aa
added method to increment node_ids, renamed extract_subtree to prune
sriram98v Oct 23, 2023
53245eb
switched node from type to enum, updated all dependent methods and st…
sriram98v Oct 23, 2023
61a7a92
cargo warnings
sriram98v Oct 23, 2023
2be296e
cargo clippy
sriram98v Oct 23, 2023
5356840
switched to using preOrderNodeiterator for preOrderEdgeIterator
sriram98v Oct 23, 2023
ec4cf09
implemented graft_subtree method
sriram98v Oct 23, 2023
8615f6d
implemented partial reroot_at_node (dfs)
sriram98v Oct 23, 2023
86e8fe3
renamed graft_subtree to graft
sriram98v Oct 24, 2023
2ccd142
implemented iter_edges_pre and reroot at node
sriram98v Oct 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
renamed graft_subtree to graft
sriram98v committed Oct 24, 2023
commit 86e8fe3d3037b0e3a4ca18689179e5e287f63091
2 changes: 1 addition & 1 deletion src/tree/simple_rtree.rs
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ pub trait SimpleRTree {
fn is_leaf(&self, node_id: &NodeID)->bool;

/// Attaches input tree to self by spliting an edge
fn graft_subtree(&mut self, tree: Box<dyn SimpleRTree>, edge: (&NodeID, &NodeID), edge_weights:(Option<EdgeWeight>, Option<EdgeWeight>), graft_edge_weight: Option<EdgeWeight>);
fn graft(&mut self, tree: Box<dyn SimpleRTree>, edge: (&NodeID, &NodeID), edge_weights:(Option<EdgeWeight>, Option<EdgeWeight>), graft_edge_weight: Option<EdgeWeight>);

/// Returns subtree starting at given node, while corresponding nodes from self.
fn prune(&mut self, node_id: &NodeID)-> Box<dyn SimpleRTree>;