Commit 9f38d42e authored by Federico Ciuffardi's avatar Federico Ciuffardi
Browse files

distance crit fixed

parent dd58a917
......@@ -200,7 +200,7 @@ void DisMapIC::update_distance_map(pos_set source_to_true, pos_set source_to_fal
for (auto it = source_to_false.begin(); it != source_to_false.end(); it++) {
pos p = *it;
remove_source(p);
//cout << "remove_source " << p << endl;
// cout << "remove_source " << p << endl;
}
for (int i = 0; i < free_to_obstructed.size(); i++) {
......
......@@ -665,10 +665,16 @@ bool GVDIC::has_neighbour_of_deg(pos p, int deg) {
// have to be removed from the distance map
void GVDIC::update_possible_crit(pos_set to_add_gvd, pos_set to_erase_gvd) {
pos_set to_add_pc, to_erase_pc;
for (auto it = to_erase_gvd.begin(); it != to_erase_gvd.end(); it++) {
pos p = *it;
possible_crit.erase(p);
bool is_possible_crit_old = is_elem(possible_crit,p);
if(is_possible_crit_old){
possible_crit_to_false.insert(p);
possible_crit.erase(p);
}
}
for (auto it = to_add_gvd.begin(); it != to_add_gvd.end(); it++) {
pos p = *it;
bool is_possible_crit_old = is_elem(possible_crit,p);
......@@ -691,6 +697,8 @@ void GVDIC::update_possible_crit(pos_set to_add_gvd, pos_set to_erase_gvd) {
// pcrit distance map
///
void GVDIC::update_possible_crit_distance_map(){
//cout<<"posibles criticos "<<possible_crit_to_true<<endl;
//cout<<"ex posibles criticos "<<possible_crit_to_false<<endl;
disMapIC->update_distance_map(possible_crit_to_true,possible_crit_to_false);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment