Show
Ignore:
Timestamp:
11/11/11 21:27:50 (13 years ago)
Author:
sindj
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/robust/robustlib.h

    r1396 r1405  
    16581658                                                // ************************************************************************** 
    16591659 
     1660                                                if(current_negative->get_state(SPLIT)==0) 
     1661                                                { 
     1662                                                        for_splitting[k].remove(current_negative); 
     1663                                                }                                                
     1664                                                 
    16601665                                                if(!current_positive->totally_neutral) 
    16611666                                                { 
     
    16871692                                                                // polyhedron to neutral 
    16881693                                                                current_positive->set_state(0,SPLIT); 
    1689  
    1690                                                                 for_splitting[k].remove(current_negative); 
     1694                                                                 
    16911695                                                                // and we add it to the list of polyhedrons to be SPLIT 
    16921696                                                                for_splitting[k].push_back(current_positive);                                                    
     
    16961700                                                        // If the MERGEd polyhedron is to be split.. 
    16971701                                                        if(current_positive->get_state(SPLIT)==0) 
    1698                                                         { 
     1702                                                        {                                                                
    16991703                                                                // We need to fill the lists related to split with correct values, adding the SPLIT 
    17001704                                                                // positive, negative and neutral children to according list in the MERGE positive, 
     
    17591763 
    17601764                                                // We clear the grandparents list for further reuse. 
    1761                                                 current_positive->grandparents.clear(); 
    1762                                  
    1763                                                 // Triangulate the newly created polyhedron and compute its normalization integral if the 
    1764                                                 // polyhedron is a toprow. 
    1765                                                 normalization_factor += current_positive->triangulate(k==for_splitting.size()-1 && !will_be_split); 
     1765                                                current_positive->grandparents.clear();                          
     1766                                                 
    17661767                                                 
    17671768                                                // Delete the negative polyhedron from the Hasse diagram (rewire all the connections) 
     
    18171818                                                {                                                        
    18181819                                                        vertices_to_be_reduced.insert((vertex*)(*merge_ref));                                                    
    1819                                                 }                                                                                                
     1820                                                }        
     1821 
     1822                                                // Triangulate the newly created polyhedron and compute its normalization integral if the 
     1823                                                // polyhedron is a toprow. 
     1824                                                normalization_factor += current_positive->triangulate(k==for_splitting.size()-1 && !will_be_split); 
    18201825                                        } 
    18211826                                }                        
     
    19261931                                                toprow* neutral_toprow = new toprow(); 
    19271932                                                 
    1928                                                 // A toprow needs a valid condition 
    1929                                                 neutral_toprow->condition_sum   = ((toprow*)current_polyhedron)->condition_sum; // tohle tu bylo driv: zeros(number_of_parameters+1); 
    1930                                                 neutral_toprow->condition_order = ((toprow*)current_polyhedron)->condition_order+1; 
     1933                                                if(k==number_of_parameters) 
     1934                                                { 
     1935                                                        // A toprow needs a valid condition 
     1936                                                        neutral_toprow->condition_sum   = ((toprow*)current_polyhedron)->condition_sum; // tohle tu bylo driv: zeros(number_of_parameters+1); 
     1937                                                        neutral_toprow->condition_order = ((toprow*)current_polyhedron)->condition_order+1; 
     1938                                                } 
    19311939 
    19321940                                                // We assign it to the totally neutral child variable