Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
shortest_paths.h File Reference
#include <cstdint>
#include <limits>
#include <memory>
#include <vector>
#include "absl/log/check.h"
#include "ortools/base/logging.h"
#include "ortools/graph/ebert_graph.h"
#include "ortools/graph/graph.h"

Go to the source code of this file.

Classes

class  operations_research::PathContainer
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 

Typedefs

typedef uint32_t operations_research::PathDistance
 

Functions

template<class GraphType >
void operations_research::GetGraphNodes (const GraphType &graph, std::vector< NodeIndex > *nodes)
 Utility function which returns a vector containing all nodes of a graph.
 
template<class GraphType >
void operations_research::GetGraphNodesFromGraph (const GraphType &graph, std::vector< typename GraphType::NodeIndex > *nodes)
 
template<class GraphType >
void operations_research::ComputeOneToAllShortestPaths (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, typename GraphType::NodeIndex source, PathContainer *const path_container)
 Computes shortest paths from the node 'source' to all nodes in the graph.
 
template<class GraphType >
void operations_research::ComputeOneToManyShortestPaths (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, typename GraphType::NodeIndex source, const std::vector< typename GraphType::NodeIndex > &destinations, PathContainer *const path_container)
 Computes shortest paths from the node 'source' to nodes in 'destinations'.
 
template<class GraphType >
std::vector< typename GraphType::NodeIndex > operations_research::ComputeOneToOneShortestPath (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, typename GraphType::NodeIndex source, typename GraphType::NodeIndex destination)
 
template<class GraphType >
void operations_research::ComputeManyToAllShortestPathsWithMultipleThreads (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< typename GraphType::NodeIndex > &sources, int num_threads, PathContainer *const path_container)
 
template<class GraphType >
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< typename GraphType::NodeIndex > &sources, const std::vector< typename GraphType::NodeIndex > &destinations, int num_threads, PathContainer *const path_container)
 
template<>
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const ListGraph<> &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< ListGraph<>::NodeIndex > &sources, const std::vector< ListGraph<>::NodeIndex > &destinations, int num_threads, PathContainer *path_container)
 
template<>
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const StaticGraph<> &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< StaticGraph<>::NodeIndex > &sources, const std::vector< StaticGraph<>::NodeIndex > &destinations, int num_threads, PathContainer *path_container)
 
template<>
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const ReverseArcListGraph<> &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< ReverseArcListGraph<>::NodeIndex > &sources, const std::vector< ReverseArcListGraph<>::NodeIndex > &destinations, int num_threads, PathContainer *path_container)
 
template<>
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const ReverseArcStaticGraph<> &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< ReverseArcStaticGraph<>::NodeIndex > &sources, const std::vector< ReverseArcStaticGraph<>::NodeIndex > &destinations, int num_threads, PathContainer *path_container)
 
template<>
void operations_research::ComputeManyToManyShortestPathsWithMultipleThreads (const ReverseArcMixedGraph<> &graph, const std::vector< PathDistance > &arc_lengths, const std::vector< ReverseArcMixedGraph<>::NodeIndex > &sources, const std::vector< ReverseArcMixedGraph<>::NodeIndex > &destinations, int num_threads, PathContainer *path_container)
 
template<class GraphType >
void operations_research::ComputeAllToAllShortestPathsWithMultipleThreads (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, int num_threads, PathContainer *const path_container)
 Computes shortest paths between all nodes of the graph.
 

Variables

const PathDistance operations_research::kDisconnectedPathDistance