2017-07-24 20:05:15 -04:00
|
|
|
#ifndef OSRM_CUSTOMIZER_CELL_METRIC_HPP
|
|
|
|
#define OSRM_CUSTOMIZER_CELL_METRIC_HPP
|
|
|
|
|
|
|
|
#include "storage/io_fwd.hpp"
|
|
|
|
#include "storage/shared_memory_ownership.hpp"
|
|
|
|
|
|
|
|
#include "util/typedefs.hpp"
|
2017-08-14 17:24:33 -04:00
|
|
|
#include "util/vector_view.hpp"
|
2017-07-24 20:05:15 -04:00
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace customizer
|
|
|
|
{
|
|
|
|
namespace detail
|
|
|
|
{
|
|
|
|
// Encapsulated one metric to make it easily replacable in CelLStorage
|
|
|
|
template <storage::Ownership Ownership> struct CellMetricImpl
|
|
|
|
{
|
|
|
|
template <typename T> using Vector = util::ViewOrVector<T, Ownership>;
|
|
|
|
|
|
|
|
Vector<EdgeWeight> weights;
|
|
|
|
Vector<EdgeDuration> durations;
|
2018-10-30 00:47:49 -04:00
|
|
|
Vector<EdgeDistance> distances;
|
2017-07-24 20:05:15 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
using CellMetric = detail::CellMetricImpl<storage::Ownership::Container>;
|
|
|
|
using CellMetricView = detail::CellMetricImpl<storage::Ownership::View>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|