Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
connected_components.h File Reference
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <type_traits>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/hash/hash.h"
#include "absl/meta/type_traits.h"
#include "ortools/base/logging.h"
#include "ortools/base/map_util.h"

Go to the source code of this file.

Classes

class  DenseConnectedComponentsFinder
 A connected components finder that only works on dense ints. More...
 
struct  internal::ConnectedComponentsTypeHelper< T, CompareOrHashT, Eq >
 
struct  internal::ConnectedComponentsTypeHelper< T, CompareOrHashT, Eq >::SelectContainer< U, V, E >
 
struct  internal::ConnectedComponentsTypeHelper< T, CompareOrHashT, Eq >::SelectContainer< U, V, absl::enable_if_t< std::is_integral< decltype(std::declval< const U & >()(std::declval< const T & >()))>::value &&std::is_same_v< V, void > > >
 
struct  internal::ConnectedComponentsTypeHelper< T, CompareOrHashT, Eq >::SelectContainer< U, V, absl::enable_if_t< std::is_integral< decltype(std::declval< const U & >()(std::declval< const T & >()))>::value &&!std::is_same_v< V, void > > >
 Specialization for when U is a hash functor and Eq is provided (not void). More...
 
class  ConnectedComponentsFinder< T, CompareOrHashT, Eq >
 

Namespaces

namespace  util
 A collections of i/o utilities for the Graph classes in ./graph.h.
 
namespace  internal
 

Functions

template<class UndirectedGraph , class NodeType >
std::vector< NodeType > util::GetConnectedComponentsTpl (NodeType num_nodes, const UndirectedGraph &graph)
 
template<class UndirectedGraph >
std::vector< int > util::GetConnectedComponents (int num_nodes, const UndirectedGraph &graph)