Trip with Fixed Start and End points (TFSE) (#3408)

* fixed start and end trip feature to trip service
This commit is contained in:
Kajari Ghosh
2017-02-10 05:13:20 -05:00
committed by GitHub
parent 3e2db47cc8
commit 2218658969
15 changed files with 895 additions and 277 deletions
+12
View File
@@ -46,6 +46,18 @@ template <typename T> class DistTableWrapper
return table_[index];
}
void SetValue(NodeID from, NodeID to, EdgeWeight value)
{
BOOST_ASSERT_MSG(from < number_of_nodes_, "from ID is out of bound");
BOOST_ASSERT_MSG(to < number_of_nodes_, "to ID is out of bound");
const auto index = from * number_of_nodes_ + to;
BOOST_ASSERT_MSG(index < table_.size(), "index is out of bound");
table_[index] = value;
}
ConstIterator begin() const { return std::begin(table_); }
Iterator begin() { return std::begin(table_); }
+1 -2
View File
@@ -13,8 +13,7 @@ namespace util
{
// This Wrapper provides all methods that are needed for extractor::TarjanSCC, when the graph is
// given in a
// matrix representation (e.g. as output from a distance table call)
// given in a matrix representation (e.g. as output from a distance table call)
template <typename T> class MatrixGraphWrapper
{
+2
View File
@@ -60,6 +60,8 @@ using NameID = std::uint32_t;
using EdgeWeight = std::int32_t;
using TurnPenalty = std::int16_t; // turn penalty in 100ms units
static const std::size_t INVALID_INDEX = std::numeric_limits<std::size_t>::max();
using LaneID = std::uint8_t;
static const LaneID INVALID_LANEID = std::numeric_limits<LaneID>::max();
using LaneDataID = std::uint16_t;