Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iterator>
#include <limits>
#include <new>
#include <type_traits>
#include <vector>
#include "absl/base/port.h"
#include "absl/debugging/leak_check.h"
#include "absl/types/span.h"
#include "ortools/base/logging.h"
#include "ortools/base/macros.h"
#include "ortools/base/types.h"
#include "ortools/graph/iterators.h"
Go to the source code of this file.
Namespaces | |
namespace | util |
A collections of i/o utilities for the Graph classes in ./graph.h. | |
Macros | |
#define | DEFINE_RANGE_BASED_ARC_ITERATION(c, t, e) |
#define | DEFINE_STL_ITERATOR_FUNCTIONS(iterator_class_name) |
Typedefs | |
typedef ListGraph | util::Graph |
Defining the simplest Graph interface as Graph for convenience. | |
Functions | |
template<class IntVector , class Array , class ElementType > | |
void | util::PermuteWithExplicitElementType (const IntVector &permutation, Array *array_to_permute, ElementType unused) |
template<class IntVector , class Array > | |
void | util::Permute (const IntVector &permutation, Array *array_to_permute) |
template<class IntVector > | |
void | util::Permute (const IntVector &permutation, std::vector< bool > *array_to_permute) |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ListGraph, Outgoing, Base::kNilArc) | |
ListGraph implementation -------------------------------------------------—. | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (StaticGraph, Outgoing, DirectArcLimit(node)) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcListGraph, Outgoing, Base::kNilArc) | |
ReverseArcListGraph implementation ---------------------------------------—. | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcListGraph, Incoming, Base::kNilArc) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcListGraph, OutgoingOrOppositeIncoming, Base::kNilArc) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcListGraph, OppositeIncoming, Base::kNilArc) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcStaticGraph, Outgoing, DirectArcLimit(node)) | |
ReverseArcStaticGraph implementation -------------------------------------—. | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcStaticGraph, Incoming, ReverseArcLimit(node)) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcStaticGraph, OutgoingOrOppositeIncoming, DirectArcLimit(node)) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcStaticGraph, OppositeIncoming, ReverseArcLimit(node)) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcMixedGraph, Outgoing, DirectArcLimit(node)) | |
ReverseArcMixedGraph implementation --------------------------------------—. | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcMixedGraph, Incoming, Base::kNilArc) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcMixedGraph, OutgoingOrOppositeIncoming, DirectArcLimit(node)) | |
util::DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcMixedGraph, OppositeIncoming, Base::kNilArc) | |
#define DEFINE_RANGE_BASED_ARC_ITERATION | ( | c, | |
t, | |||
e ) |
Macros to wrap old style iteration into the new range-based for loop style. The parameters are:
#define DEFINE_STL_ITERATOR_FUNCTIONS | ( | iterator_class_name | ) |
Adapt our old iteration style to support range-based for loops. Add typedefs required by std::iterator_traits.