Support rectangular matrix with less sources than targets

This commit is contained in:
Fabien Girard
2015-11-05 18:28:00 +01:00
committed by Patrick Niklaus
parent 4253ebf243
commit 478d4a571a
8 changed files with 128 additions and 29 deletions
+10
View File
@@ -148,8 +148,18 @@ void RouteParameters::addCoordinate(
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
}
void RouteParameters::addSource(
const boost::fusion::vector<double, double> &received_coordinates)
{
sources.emplace_back(
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<0>(received_coordinates)),
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
}
void RouteParameters::getCoordinatesFromGeometry(const std::string &geometry_string)
{
PolylineCompressor pc;
coordinates = pc.decode_string(geometry_string);
}
void RouteParameters::setMappedPointsFlag(const bool flag) { mapped_points = flag; }