@@ -116,10 +116,6 @@ class GenericPathContainer {
116116 using NodeIndex = typename GraphType::NodeIndex;
117117 using Impl = internal::PathContainerImpl<NodeIndex, GraphType::kNilNode >;
118118
119- // TODO(b/385094969): Remove this when all clients are migrated, and use
120- // factory functions instead.
121- GenericPathContainer ();
122-
123119 // This type is neither copyable nor movable.
124120 GenericPathContainer (const GenericPathContainer&) = delete ;
125121 GenericPathContainer& operator =(const GenericPathContainer&) = delete ;
@@ -153,9 +149,6 @@ class GenericPathContainer {
153149 // Builds a path container which only stores distances between path nodes.
154150 static GenericPathContainer BuildPathDistanceContainer ();
155151
156- ABSL_DEPRECATED (" Use factory function BuildPathDistanceContainer instead." )
157- static void BuildPathDistanceContainer (GenericPathContainer* path_container);
158-
159152 // Builds a path container which stores explicit paths and distances between
160153 // path nodes in a memory-compact representation.
161154 // In this case `GetPenultimateNodeInPath()` is `O(log(path_tree_size))`,
@@ -168,11 +161,6 @@ class GenericPathContainer {
168161 // `O(log(path_tree_size) * path_size)`.
169162 static GenericPathContainer BuildInMemoryCompactPathContainer ();
170163
171- ABSL_DEPRECATED (
172- " Use factory function BuildInMemoryCompactPathContainer instead." )
173- static void BuildInMemoryCompactPathContainer (
174- GenericPathContainer* path_container);
175-
176164 // TODO(user): Add save-to-disk container.
177165 // TODO(user): Add `BuildInMemoryFastPathContainer()`, which does
178166 // `GetPenultimateNodeInPath()` in `O(1)`.
@@ -230,12 +218,12 @@ void ComputeOneToAllShortestPaths(
230218// Computes shortest paths from the node `source` to nodes in `destinations`.
231219// TODO(b/385094969): Remove second template parameter when all clients are
232220// migrated.
233- template <class GraphType , class PathContainerGraphType >
221+ template <class GraphType >
234222void ComputeOneToManyShortestPaths (
235223 const GraphType& graph, const std::vector<PathDistance>& arc_lengths,
236224 typename GraphType::NodeIndex source,
237225 const std::vector<typename GraphType::NodeIndex>& destinations,
238- GenericPathContainer<PathContainerGraphType >* const path_container) {
226+ GenericPathContainer<GraphType >* const path_container) {
239227 std::vector<typename GraphType::NodeIndex> sources (1 , source);
240228 ComputeManyToManyShortestPathsWithMultipleThreads (
241229 graph, arc_lengths, sources, destinations, 1 , path_container);
@@ -282,13 +270,10 @@ void ComputeManyToAllShortestPathsWithMultipleThreads(
282270}
283271
284272// Computes shortest paths between all nodes of the graph.
285- // TODO(b/385094969): Remove second template parameter when all clients are
286- // migrated.
287- template <class GraphType , class PathContainerGraphType >
273+ template <class GraphType >
288274void ComputeAllToAllShortestPathsWithMultipleThreads (
289275 const GraphType& graph, const std::vector<PathDistance>& arc_lengths,
290- int num_threads,
291- GenericPathContainer<PathContainerGraphType>* const path_container) {
276+ int num_threads, GenericPathContainer<GraphType>* const path_container) {
292277 std::vector<typename GraphType::NodeIndex> all_nodes;
293278 GetGraphNodesFromGraph<GraphType>(graph, &all_nodes);
294279 ComputeManyToManyShortestPathsWithMultipleThreads (
@@ -635,15 +620,13 @@ bool InsertOrUpdateEntry(
635620// using a binary heap-based Dijkstra algorithm.
636621// TODO(user): Investigate alternate implementation which wouldn't use
637622// AdjustablePriorityQueue.
638- // TODO(b/385094969): Remove second template parameter when all clients are
639- // migrated.
640- template <class GraphType , class PathContainerGraphType >
623+ template <class GraphType >
641624void ComputeOneToManyOnGraph (
642625 const GraphType* const graph,
643626 const std::vector<PathDistance>* const arc_lengths,
644627 typename GraphType::NodeIndex source,
645628 const std::vector<typename GraphType::NodeIndex>* const destinations,
646- typename GenericPathContainer<PathContainerGraphType >::Impl* const paths) {
629+ typename GenericPathContainer<GraphType >::Impl* const paths) {
647630 using NodeIndex = typename GraphType::NodeIndex;
648631 using ArcIndex = typename GraphType::ArcIndex;
649632 using NodeEntryT = NodeEntry<NodeIndex, GraphType::kNilNode >;
@@ -715,9 +698,6 @@ void ComputeOneToManyOnGraph(
715698
716699} // namespace internal
717700
718- template <class GraphType >
719- GenericPathContainer<GraphType>::GenericPathContainer() = default ;
720-
721701template <class GraphType >
722702GenericPathContainer<GraphType>::~GenericPathContainer () = default ;
723703
@@ -744,22 +724,6 @@ void GenericPathContainer<GraphType>::GetPath(
744724 container_->GetPath (from, to, path);
745725}
746726
747- template <class GraphType >
748- void GenericPathContainer<GraphType>::BuildPathDistanceContainer(
749- GenericPathContainer* const path_container) {
750- CHECK (path_container != nullptr );
751- path_container->container_ = std::make_unique<
752- internal::DistanceContainer<NodeIndex, GraphType::kNilNode >>();
753- }
754-
755- template <class GraphType >
756- void GenericPathContainer<GraphType>::BuildInMemoryCompactPathContainer(
757- GenericPathContainer* const path_container) {
758- CHECK (path_container != nullptr );
759- path_container->container_ = std::make_unique<
760- internal::InMemoryCompactPathContainer<NodeIndex, GraphType::kNilNode >>();
761- }
762-
763727template <class GraphType >
764728GenericPathContainer<GraphType>
765729GenericPathContainer<GraphType>::BuildPathDistanceContainer() {
@@ -776,22 +740,12 @@ GenericPathContainer<GraphType>::BuildInMemoryCompactPathContainer() {
776740 NodeIndex, GraphType::kNilNode >>());
777741}
778742
779- // TODO(b/385094969): Remove second template parameter when all clients are
780- // migrated.
781- template <class GraphType , class PathContainerGraphType >
743+ template <class GraphType >
782744void ComputeManyToManyShortestPathsWithMultipleThreads (
783745 const GraphType& graph, const std::vector<PathDistance>& arc_lengths,
784746 const std::vector<typename GraphType::NodeIndex>& sources,
785747 const std::vector<typename GraphType::NodeIndex>& destinations,
786- int num_threads,
787- GenericPathContainer<PathContainerGraphType>* const paths) {
788- static_assert (std::is_same_v<typename GraphType::NodeIndex,
789- typename PathContainerGraphType::NodeIndex>,
790- " use an explicit `GenericPathContainer<T>` instead of using "
791- " `PathContainer`" );
792- static_assert (GraphType::kNilNode == PathContainerGraphType::kNilNode ,
793- " use an explicit `GenericPathContainer<T>` instead of using "
794- " `PathContainer`" );
748+ int num_threads, GenericPathContainer<GraphType>* const paths) {
795749 if (graph.num_nodes () > 0 ) {
796750 CHECK_EQ (graph.num_arcs (), arc_lengths.size ())
797751 << " Number of arcs in graph must match arc length vector size" ;
@@ -812,10 +766,8 @@ void ComputeManyToManyShortestPathsWithMultipleThreads(
812766 pool->StartWorkers ();
813767 for (int i = 0 ; i < unique_sources.size (); ++i) {
814768 pool->Schedule (absl::bind_front (
815- &internal::ComputeOneToManyOnGraph<GraphType,
816- PathContainerGraphType>,
817- &graph, &arc_lengths, unique_sources[i], &unique_destinations,
818- container));
769+ &internal::ComputeOneToManyOnGraph<GraphType>, &graph, &arc_lengths,
770+ unique_sources[i], &unique_destinations, container));
819771 }
820772 }
821773 container->Finalize ();
0 commit comments