42bool CellsRadiusComparison(
const std::pair<CellPtr, double> lhs,
const std::pair<CellPtr, double> rhs)
55 c_vector<double,2> line_position;
56 line_position[0] = norm_2(rCellPosition)*cos(angle);
57 line_position[1] = norm_2(rCellPosition)*sin(angle);
59 double distance_between_cell_and_line = norm_2(rCellPosition - line_position);
61 return (distance_between_cell_and_line <= widthOfSection);
71 assert(angle>=-M_PI && angle<=M_PI);
73 std::list<std::pair<CellPtr, double> > cells_list;
85 cells_list.push_back(pair);
90 cells_list.sort(CellsRadiusComparison);
93 std::vector<CellPtr> ordered_cells;
94 for (std::list<std::pair<CellPtr, double> >::iterator iter = cells_list.begin();
95 iter != cells_list.end();
98 ordered_cells.push_back(iter->first);
101 return ordered_cells;