Add namespace around all files
This commit is contained in:
@@ -16,11 +16,13 @@
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace engine
|
||||
{
|
||||
namespace trip
|
||||
{
|
||||
|
||||
// computes the distance of a given permutation
|
||||
EdgeWeight ReturnDistance(const DistTableWrapper<EdgeWeight> &dist_table,
|
||||
EdgeWeight ReturnDistance(const util::DistTableWrapper<EdgeWeight> &dist_table,
|
||||
const std::vector<NodeID> &location_order,
|
||||
const EdgeWeight min_route_dist,
|
||||
const std::size_t component_size)
|
||||
@@ -44,7 +46,7 @@ template <typename NodeIDIterator>
|
||||
std::vector<NodeID> BruteForceTrip(const NodeIDIterator start,
|
||||
const NodeIDIterator end,
|
||||
const std::size_t number_of_locations,
|
||||
const DistTableWrapper<EdgeWeight> &dist_table)
|
||||
const util::DistTableWrapper<EdgeWeight> &dist_table)
|
||||
{
|
||||
(void)number_of_locations; // unused
|
||||
|
||||
@@ -76,6 +78,8 @@ std::vector<NodeID> BruteForceTrip(const NodeIDIterator start,
|
||||
return route;
|
||||
}
|
||||
|
||||
} // end namespace trip
|
||||
} // end namespace osrm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TRIP_BRUTE_FORCE_HPP
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace engine
|
||||
{
|
||||
namespace trip
|
||||
{
|
||||
|
||||
@@ -23,7 +25,7 @@ namespace trip
|
||||
using NodeIDIter = std::vector<NodeID>::iterator;
|
||||
std::pair<EdgeWeight, NodeIDIter>
|
||||
GetShortestRoundTrip(const NodeID new_loc,
|
||||
const DistTableWrapper<EdgeWeight> &dist_table,
|
||||
const util::DistTableWrapper<EdgeWeight> &dist_table,
|
||||
const std::size_t number_of_locations,
|
||||
std::vector<NodeID> &route)
|
||||
{
|
||||
@@ -76,7 +78,7 @@ std::vector<NodeID> FindRoute(const std::size_t &number_of_locations,
|
||||
const std::size_t &component_size,
|
||||
const NodeIDIterator &start,
|
||||
const NodeIDIterator &end,
|
||||
const DistTableWrapper<EdgeWeight> &dist_table,
|
||||
const util::DistTableWrapper<EdgeWeight> &dist_table,
|
||||
const NodeID &start1,
|
||||
const NodeID &start2)
|
||||
{
|
||||
@@ -138,7 +140,7 @@ template <typename NodeIDIterator>
|
||||
std::vector<NodeID> FarthestInsertionTrip(const NodeIDIterator &start,
|
||||
const NodeIDIterator &end,
|
||||
const std::size_t number_of_locations,
|
||||
const DistTableWrapper<EdgeWeight> &dist_table)
|
||||
const util::DistTableWrapper<EdgeWeight> &dist_table)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// START FARTHEST INSERTION HERE
|
||||
@@ -189,7 +191,8 @@ std::vector<NodeID> FarthestInsertionTrip(const NodeIDIterator &start,
|
||||
return FindRoute(number_of_locations, component_size, start, end, dist_table, max_from, max_to);
|
||||
}
|
||||
|
||||
} // end namespace trip
|
||||
} // end namespace osrm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TRIP_FARTHEST_INSERTION_HPP
|
||||
|
||||
@@ -15,13 +15,16 @@
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace engine
|
||||
{
|
||||
namespace trip
|
||||
{
|
||||
|
||||
template <typename NodeIDIterator>
|
||||
std::vector<NodeID> NearestNeighbourTrip(const NodeIDIterator &start,
|
||||
const NodeIDIterator &end,
|
||||
const std::size_t number_of_locations,
|
||||
const DistTableWrapper<EdgeWeight> &dist_table)
|
||||
const util::DistTableWrapper<EdgeWeight> &dist_table)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// START GREEDY NEAREST NEIGHBOUR HERE
|
||||
@@ -90,6 +93,8 @@ std::vector<NodeID> NearestNeighbourTrip(const NodeIDIterator &start,
|
||||
return route;
|
||||
}
|
||||
|
||||
} // end namespace trip
|
||||
} // end namespace osrm
|
||||
#endif // TRIP_NEAREST_NEIGHBOUR_HPP
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TRIP_NEAREST_NEIGHBOUR_HPP
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace engine
|
||||
{
|
||||
namespace trip
|
||||
{
|
||||
|
||||
@@ -32,6 +34,9 @@ void TabuSearchTrip(const PhantomNodeArray &phantom_node_vector,
|
||||
std::vector<int> &min_loc_permutation)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif // TRIP_BRUTE_FORCE_HPP
|
||||
}
|
||||
|
||||
#endif // TRIP_BRUTE_FORCE_HPP
|
||||
|
||||
Reference in New Issue
Block a user