inline void get_left_turns( Turns& turns, TurnSegmentIndices const& turn_segment_indices, std::set<int>& keep_indices) { std::sort(angles.begin(), angles.end(), angle_sort()); calculate_left_turns<AngleInfo>(angles, turns, turn_segment_indices, keep_indices); }
inline bool is_occupied() { if (boost::size(angles) <= 1) { return false; } std::sort(angles.begin(), angles.end(), angle_sort()); typedef geometry::closing_iterator<collection_type const> closing_iterator; closing_iterator vit(angles); closing_iterator end(angles, true); closing_iterator prev = vit++; for( ; vit != end; prev = vit++) { if (! geometry::math::equals(prev->angle, vit->angle) && ! prev->incoming && vit->incoming) { return false; } } return true; }
/*! The order of the strings in the given collection is important. * They must follow: * - first, second, third, fourth, fifth, last, before, after, of. * * It is not necessary to send in a complete set if only a few * elements are to be replaced as long as the correct beg_pos is used. * * Ex: To keep the default first through fifth elements, but replace * the rest with a collection of: * - "final", "prior", "following", "in". * The beg_pos of date_generator_formatter::last would be used. */ void elements(const collection_type& new_strings, phrase_elements beg_pos=first) { if(beg_pos < number_of_phrase_elements) { typename collection_type::iterator itr = phrase_strings.begin(); itr += beg_pos; std::copy(new_strings.begin(), new_strings.end(), itr); //phrase_strings.begin()); } }
iterator begin() { return m_elements.begin(); }
inline iterator begin() { return value.begin(); }
inline const_iterator begin() const { return value.begin(); }