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"
#include "ortools/base/ptr_util.h"

Go to the source code of this file.

Classes

class  DenseConnectedComponentsFinder
 NOTE(user): The rest of the functions below should also be in namespace util, but for historical reasons it hasn't been done yet. More...
 
class  ConnectedComponentsFinder< T, CompareOrHashT >
 Usage: ConnectedComponentsFinder<MyNodeType> cc; cc.AddNode(node1); cc.AddNode(node2); cc.AddEdge(node1, node2); ... More...
 

Namespaces

 util
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 

Functions

template<class UndirectedGraph >
std::vector< int > util::GetConnectedComponents (int num_nodes, const UndirectedGraph &graph)
 Finds the connected components of the graph, using BFS internally. More...