16#ifndef OR_TOOLS_ROUTING_PARSERS_SIMPLE_GRAPH_H_
17#define OR_TOOLS_ROUTING_PARSERS_SIMPLE_GRAPH_H_
24#include "absl/hash/hash.h"
37 int64_t
tail()
const {
return tail_; }
38 int64_t
head()
const {
return head_; }
41 return (head_ == other.head_ && tail_ == other.tail_) ||
42 (head_ == other.tail_ && tail_ == other.head_);
51 return H::combine(std::move(h), std::min(
a.head_,
a.tail_),
52 std::max(
a.head_,
a.tail_));
67 int64_t
tail()
const {
return tail_; }
68 int64_t
head()
const {
return head_; }
72 return head_ == other.head_ && tail_ == other.tail_;
80 return H::combine(std::move(h),
a.tail_,
a.head_);
101 return a.x ==
b.x &&
a.y ==
b.y;
108 return stream <<
"{x = " << coordinates.
x <<
", y = " << coordinates.
y
111 template <
typename H>
113 return H::combine(std::move(h), coordinates.
x, coordinates.
y);
127 return a.x ==
b.x &&
a.y ==
b.y &&
a.z ==
b.z;
134 return stream <<
"{x = " << coordinates.
x <<
", y = " << coordinates.
y
135 <<
", z = " << coordinates.
z <<
"}";
137 template <
typename H>
139 return H::combine(std::move(h), coordinates.
x, coordinates.
y,
bool operator!=(const Arc &other) const
friend H AbslHashValue(H h, const Arc &a)
bool operator==(const Arc &other) const
Arc(int64_t tail, int64_t head)
bool operator!=(const Edge &other) const
friend H AbslHashValue(H h, const Edge &a)
Edge(int64_t tail, int64_t head)
bool operator==(const Edge &other) const
In SWIG mode, we don't want anything besides these top-level includes.
std::function< int64_t(int, int)> EdgeWeights
Mapping between an edge (given by its tail and its head) and its weight.
friend bool operator==(const Coordinates2 &a, const Coordinates2 &b)
friend bool operator!=(const Coordinates2 &a, const Coordinates2 &b)
friend H AbslHashValue(H h, const Coordinates2 &coordinates)
friend std::ostream & operator<<(std::ostream &stream, const Coordinates2 &coordinates)
friend bool operator==(const Coordinates3 &a, const Coordinates3 &b)
friend H AbslHashValue(H h, const Coordinates3 &coordinates)
friend bool operator!=(const Coordinates3 &a, const Coordinates3 &b)
friend std::ostream & operator<<(std::ostream &stream, const Coordinates3 &coordinates)
Coordinates3(T x, T y, T z)