Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
rooted_tree.h File Reference
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "absl/types/span.h"
#include "ortools/base/logging.h"
#include "ortools/base/status_builder.h"
#include "ortools/base/status_macros.h"

Go to the source code of this file.

Classes

class  operations_research::RootedTree< NodeType >
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 
namespace  operations_research::internal
 End of the interface. Below is the implementation.
 

Functions

template<typename Graph >
absl::StatusOr< RootedTree< typename Graph::NodeType > > operations_research::RootedTreeFromGraph (typename Graph::NodeType root, const Graph &graph, std::vector< typename Graph::NodeType > *topological_order=nullptr, std::vector< typename Graph::NodeType > *depths=nullptr)
 
template<typename NodeType >
bool operations_research::internal::IsValidParent (const NodeType node, const NodeType num_tree_nodes)
 
template<typename NodeType >
absl::Status operations_research::internal::IsValidNode (const NodeType node, const NodeType num_tree_nodes)
 
template<typename NodeType >
std::vector< NodeType > operations_research::internal::ExtractCycle (absl::Span< const NodeType > parents, const NodeType node_in_cycle)
 
template<typename NodeType >
std::string operations_research::internal::CycleErrorMessage (absl::Span< const NodeType > cycle)
 
template<typename NodeType >
std::vector< NodeType > operations_research::internal::CheckForCycle (absl::Span< const NodeType > parents, std::vector< NodeType > *topological_order)
 
template<typename Graph >
absl::StatusOr< RootedTree< typename Graph::NodeIndex > > operations_research::RootedTreeFromGraph (const typename Graph::NodeIndex root, const Graph &graph, std::vector< typename Graph::NodeIndex > *const topological_order, std::vector< typename Graph::NodeIndex > *const depths)