Changeset 1299 for applications/robust/robustlib.cpp
- Timestamp:
- 03/16/11 17:20:48 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/robust/robustlib.cpp
r1282 r1299 4 4 void polyhedron::triangulate(bool should_integrate) 5 5 { 6 this->triangulation.clear(); 7 6 8 if(should_integrate) 7 9 { … … 14 16 { 15 17 set<vertex*> new_simplex; 16 new_simplex.insert((*t_ref).begin(),(*t_ref).end()); 17 18 pair<set<vertex*>::iterator,bool> ret_val = new_simplex.insert(*vertices.begin());19 20 if(ret_val.second == true)21 { 18 new_simplex.insert((*t_ref).begin(),(*t_ref).end()); 19 20 for(set<vertex*>::iterator suitable_vert_ref = vertices.begin();*suitable_vert_ref<*(*t_ref).begin();suitable_vert_ref++) 21 { 22 new_simplex.insert(*suitable_vert_ref); 23 22 24 triangulation.push_back(new_simplex); 23 25 … … 26 28 ((toprow *)this)->probability += ((toprow *)this)->integrate_simplex(new_simplex, 'S'); 27 29 } 28 } 30 } 29 31 } 30 32 } … … 87 89 88 90 89 //cout << endl << "Base coords:" << base_vertex->get_coordinates() << endl;91 cout << endl << "Base coords:" << base_vertex->get_coordinates() << endl; 90 92 91 93 a_0 = base_vertex->get_coordinates()*cur_condition-as_toprow->condition[0]; … … 134 136 //cout << "a0:" << a_0 << " a0 coords:" << base_vertex->get_coordinates() << " am:" << a_m << " am coords:" << (*vert_ref)->get_coordinates() << endl; 135 137 136 //cout << "Absolute coords:(V" << row_count << ")" << (*vert_ref)->get_coordinates() << endl;138 cout << "Absolute coords:(V" << row_count << ")" << (*vert_ref)->get_coordinates() << endl; 137 139 //cout << "Relative coords:(V" << row_count << ")" << relative_coords << endl; 138 140