Changeset 1320 for applications/robust/robustlib.cpp
- Timestamp:
- 03/31/11 18:46:06 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/robust/robustlib.cpp
r1301 r1320 16 16 vert_simplex.insert((vertex*)this); 17 17 18 triangulation. push_back(vert_simplex);18 triangulation.insert(pair<double,set<vertex*>>(0,vert_simplex)); 19 19 } 20 20 21 21 for(list<polyhedron*>::iterator child_ref = children.begin();child_ref!=children.end();child_ref++) 22 22 { 23 for( list<set<vertex*>>::iterator t_ref = (*child_ref)->triangulation.begin();t_ref!=(*child_ref)->triangulation.end();t_ref++)23 for(map<double,set<vertex*>>::iterator t_ref = (*child_ref)->triangulation.begin();t_ref!=(*child_ref)->triangulation.end();t_ref++) 24 24 { 25 25 set<vertex*> new_simplex; 26 new_simplex.insert((*t_ref). begin(),(*t_ref).end());26 new_simplex.insert((*t_ref).second.begin(),(*t_ref).second.end()); 27 27 28 28 pair<set<vertex*>::iterator,bool> ret_val = new_simplex.insert(*vertices.begin()); … … 30 30 if(ret_val.second == true) 31 31 { 32 triangulation.push_back(new_simplex);32 double cur_prob = 0; 33 33 34 34 if(should_integrate) 35 35 { 36 ((toprow *)this)->probability += ((toprow *)this)->integrate_simplex(new_simplex, 'S'); 37 } 36 cur_prob = ((toprow *)this)->integrate_simplex(new_simplex, 'S'); 37 38 ((toprow *)this)->probability += cur_prob; 39 } 40 41 triangulation.insert(pair<double,set<vertex*>>(cur_prob,new_simplex)); 38 42 } 39 43 }