Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::DistanceContainer< NodeIndex, kNilNode > Class Template Reference

Path container which only stores distances between path nodes. More...

Detailed Description

template<class NodeIndex, NodeIndex kNilNode>
class operations_research::DistanceContainer< NodeIndex, kNilNode >

Path container which only stores distances between path nodes.

Definition at line 456 of file shortest_paths.h.

#include <shortest_paths.h>

Inheritance diagram for operations_research::DistanceContainer< NodeIndex, kNilNode >:
operations_research::InMemoryCompactPathContainer< NodeIndex, kNilNode >

Public Member Functions

 DistanceContainer ()
 DistanceContainer (const DistanceContainer &)=delete
 This type is neither copyable nor movable.
DistanceContaineroperator= (const DistanceContainer &)=delete
 ~DistanceContainer () override=default
void Initialize (const std::vector< NodeIndex > &sources, const std::vector< NodeIndex > &destinations, NodeIndex num_nodes) override
PathDistance GetDistance (NodeIndex from, NodeIndex to) const override
NodeIndex GetPenultimateNodeInPath (NodeIndex, NodeIndex) const override
void GetPath (NodeIndex, NodeIndex, std::vector< NodeIndex > *) const override
void StoreSingleSourcePaths (NodeIndex from, const std::vector< NodeIndex > &, const std::vector< PathDistance > &distance_to_destination) override

Protected Attributes

std::vector< int > reverse_sources_
std::vector< int > reverse_destinations_

Constructor & Destructor Documentation

◆ DistanceContainer() [1/2]

template<class NodeIndex, NodeIndex kNilNode>
operations_research::DistanceContainer< NodeIndex, kNilNode >::DistanceContainer ( )
inline

Definition at line 458 of file shortest_paths.h.

◆ DistanceContainer() [2/2]

template<class NodeIndex, NodeIndex kNilNode>
operations_research::DistanceContainer< NodeIndex, kNilNode >::DistanceContainer ( const DistanceContainer< NodeIndex, kNilNode > & )
delete

This type is neither copyable nor movable.

◆ ~DistanceContainer()

template<class NodeIndex, NodeIndex kNilNode>
operations_research::DistanceContainer< NodeIndex, kNilNode >::~DistanceContainer ( )
overridedefault

Member Function Documentation

◆ GetDistance()

template<class NodeIndex, NodeIndex kNilNode>
PathDistance operations_research::DistanceContainer< NodeIndex, kNilNode >::GetDistance ( NodeIndex from,
NodeIndex to ) const
inlineoverride

Definition at line 472 of file shortest_paths.h.

◆ GetPath()

template<class NodeIndex, NodeIndex kNilNode>
void operations_research::DistanceContainer< NodeIndex, kNilNode >::GetPath ( NodeIndex ,
NodeIndex ,
std::vector< NodeIndex > *  ) const
inlineoverride

Definition at line 479 of file shortest_paths.h.

◆ GetPenultimateNodeInPath()

template<class NodeIndex, NodeIndex kNilNode>
NodeIndex operations_research::DistanceContainer< NodeIndex, kNilNode >::GetPenultimateNodeInPath ( NodeIndex ,
NodeIndex  ) const
inlineoverride

Definition at line 475 of file shortest_paths.h.

◆ Initialize()

template<class NodeIndex, NodeIndex kNilNode>
void operations_research::DistanceContainer< NodeIndex, kNilNode >::Initialize ( const std::vector< NodeIndex > & sources,
const std::vector< NodeIndex > & destinations,
NodeIndex num_nodes )
inlineoverride

Definition at line 464 of file shortest_paths.h.

◆ operator=()

template<class NodeIndex, NodeIndex kNilNode>
DistanceContainer & operations_research::DistanceContainer< NodeIndex, kNilNode >::operator= ( const DistanceContainer< NodeIndex, kNilNode > & )
delete

◆ StoreSingleSourcePaths()

template<class NodeIndex, NodeIndex kNilNode>
void operations_research::DistanceContainer< NodeIndex, kNilNode >::StoreSingleSourcePaths ( NodeIndex from,
const std::vector< NodeIndex > & ,
const std::vector< PathDistance > & distance_to_destination )
inlineoverride

Definition at line 482 of file shortest_paths.h.

Member Data Documentation

◆ reverse_destinations_

template<class NodeIndex, NodeIndex kNilNode>
std::vector<int> operations_research::DistanceContainer< NodeIndex, kNilNode >::reverse_destinations_
protected

Definition at line 492 of file shortest_paths.h.

◆ reverse_sources_

template<class NodeIndex, NodeIndex kNilNode>
std::vector<int> operations_research::DistanceContainer< NodeIndex, kNilNode >::reverse_sources_
protected

Definition at line 491 of file shortest_paths.h.


The documentation for this class was generated from the following file: