Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Feb 2, 2019
1 parent 007d4fe commit de99ef3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/sim_gt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ void simTree::core (){
double remaining_length = ( rank_i == this->parameters_->my_Net->max_rank ) ? 1.0/0.0 : this->parameters_->my_Net->NodeContainer[node_i].brchlen1();
double multi_merge_para = this->parameters_->my_para_net->NodeContainer[node_i].brchlen1();
double pop_size = this->parameters_->my_pop_net->NodeContainer[node_i].brchlen1();
this->implement_coalsecent( this->parameters_->my_Net->NodeContainer[node_i].Net_node_contains_gt_node1,

remaining_length = this->implement_coalsecent( this->parameters_->my_Net->NodeContainer[node_i].Net_node_contains_gt_node1,
remaining_length, multi_merge_para, pop_size,
this->parameters_->my_Net->NodeContainer[node_i].label);

Expand All @@ -141,7 +142,7 @@ void simTree::core (){
double remaining_length = this->parameters_->my_Net->NodeContainer[node_i].brchlen2();
double multi_merge_para = this->parameters_->my_para_net->NodeContainer[node_i].brchlen2();
double pop_size = this->parameters_->my_pop_net->NodeContainer[node_i].brchlen2();
this->implement_coalsecent( this->parameters_->my_Net->NodeContainer[node_i].Net_node_contains_gt_node2,
remaining_length = this->implement_coalsecent( this->parameters_->my_Net->NodeContainer[node_i].Net_node_contains_gt_node2,
remaining_length, multi_merge_para, pop_size,
this->parameters_->my_Net->NodeContainer[node_i].label);
this->adjust_bl_core ( this->parameters_->my_Net->NodeContainer[node_i].Net_node_contains_gt_node2,
Expand Down Expand Up @@ -178,7 +179,7 @@ void simTree::remove_unused_nodes(){
}
}

void simTree::implement_coalsecent( vector <size_t> & current_alive_lineages,
double simTree::implement_coalsecent( vector <size_t> & current_alive_lineages,
double remaining_length, double multi_merge_para, double pop_size, string node_label){
this->current_lineage_Extension = 0;
size_t num_lineage = current_alive_lineages.size();
Expand Down Expand Up @@ -241,9 +242,10 @@ void simTree::implement_coalsecent( vector <size_t> & current_alive_lineages,
} else {
dout << " Nothing to coalesce. " << endl;
current_lineage_Extension = 0;
return;
return remaining_length;
}
}
return remaining_length;
}


Expand Down
2 changes: 1 addition & 1 deletion src/sim_gt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class simTree : public Tree {
void initialize_remaining_sp_node ( Net *my_Net );
void push_in_descdent();

void implement_coalsecent( vector <size_t> & current_alive_lineages,
double implement_coalsecent( vector <size_t> & current_alive_lineages,
double remaining_length, double multi_merge_para, double pop_size,
string nodelabel );
void adjust_bl_core( vector <size_t> &Net_node_contains_gt_node,
Expand Down

0 comments on commit de99ef3

Please sign in to comment.