<commit_before>#ifndef ENGINE_GUIDANCE_LEG_GEOMETRY_HPP
#define ENGINE_GUIDANCE_LEG_GEOMETRY_HPP

#include "util/coordinate.hpp"
#include "util/integer_range.hpp"

#include <boost/assert.hpp>

#include <cstddef>

#include <vector>
#include <cstdlib>

namespace osrm
{
namespace engine
{
namespace guidance
{

// locations 0---1---2-...-n-1---n
// turns     s       x      y    t
// segment   |   0   |  1   | 2  | senitel
// offsets       0      2    n-1     n
struct LegGeometry
{
    std::vector<util::Coordinate> locations;
    // segment_offset[i] .. segment_offset[i+1] (inclusive)
    // contains the geometry of segment i
    std::vector<std::size_t> segment_offsets;
    // length of the segment in meters
    std::vector<double> segment_distances;

    std::size_t FrontIndex(std::size_t segment_index) const
    {
        return segment_offsets[segment_index];
    }

    std::size_t BackIndex(std::size_t segment_index) const
    {
        return segment_offsets[segment_index + 1];
    }

    std::size_t GetNumberOfSegments() const
    {
        BOOST_ASSERT(segment_offsets.size() > 0);
        return segment_offsets.size() - 1;
    }
};
}
}
}

#endif<commit_msg>Sentinel spelling<commit_after>#ifndef ENGINE_GUIDANCE_LEG_GEOMETRY_HPP
#define ENGINE_GUIDANCE_LEG_GEOMETRY_HPP

#include "util/coordinate.hpp"
#include "util/integer_range.hpp"

#include <boost/assert.hpp>

#include <cstddef>

#include <vector>
#include <cstdlib>

namespace osrm
{
namespace engine
{
namespace guidance
{

// locations 0---1---2-...-n-1---n
// turns     s       x      y    t
// segment   |   0   |  1   | 2  | sentinel
// offsets       0      2    n-1     n
struct LegGeometry
{
    std::vector<util::Coordinate> locations;
    // segment_offset[i] .. segment_offset[i+1] (inclusive)
    // contains the geometry of segment i
    std::vector<std::size_t> segment_offsets;
    // length of the segment in meters
    std::vector<double> segment_distances;

    std::size_t FrontIndex(std::size_t segment_index) const
    {
        return segment_offsets[segment_index];
    }

    std::size_t BackIndex(std::size_t segment_index) const
    {
        return segment_offsets[segment_index + 1];
    }

    std::size_t GetNumberOfSegments() const
    {
        BOOST_ASSERT(segment_offsets.size() > 0);
        return segment_offsets.size() - 1;
    }
};
}
}
}

#endif
{'fraction_non_alphanumeric': 0.12028801355357899, 'fraction_numerical': 0.011859381617958492, 'mean_word_length': 2.910596026490066, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4427541', 'n_tokens_mistral': 846, 'n_tokens_neox': 814, 'n_words': 168}