C++ Reference
C++ Reference: Graph
NodeIndexType max_num_nodes_
Definition: ebert_graph.h:486
bool Ok() const
Definition: ebert_graph.h:393
static const NodeIndexType kNilNode
Definition: ebert_graph.h:216
bool BuildTailArray()
Definition: ebert_graph.h:816
IncomingArcIterator(const EbertGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:1300
void SetTempFromIndex(ArcIndexType source) override
Definition: ebert_graph.h:1058
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:1631
NodeIndexType StartNode(NodeIndexType node) const
Definition: ebert_graph.h:439
ArcIndexType max_end_arc_index() const
Definition: ebert_graph.h:271
bool IsOutgoingOrOppositeIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1429
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:222
ForwardEbertGraph()
Definition: ebert_graph.h:1601
ForwardEbertGraph(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1603
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:770
ArcIndexType AddArc(NodeIndexType tail, NodeIndexType head)
Definition: ebert_graph.h:1001
CycleHandlerForAnnotatedArcs(PermutationCycleHandler< ArcIndexType > *annotation_handler, NodeIndexType *data)
Definition: ebert_graph.h:575
ArcIndexType end_arc_index() const
Definition: ebert_graph.h:252
ArcIndexType NextArc(const ArcIndexType arc) const
Definition: ebert_graph.h:472
NodeIterator(const DerivedGraph &graph)
Definition: ebert_graph.h:322
TailArrayBuilder(GraphType *graph)
Definition: ebert_graph.h:1883
ArcIndexType Index() const
Definition: ebert_graph.h:355
ForwardStaticGraph(const NodeIndexType num_nodes, const ArcIndexType num_arcs, const bool sort_arcs_by_head, std::vector< std::pair< NodeIndexType, NodeIndexType > > *client_input_arcs, operations_research::PermutationCycleHandler< ArcIndexType > *const client_cycle_handler)
Definition: ebert_graph.h:621
static const ArcIndexType kNilArc
Definition: ebert_graph.h:219
NodeIndexType NodeIndex
Definition: ebert_graph.h:564
NodeIndexType DirectArcTail(const ArcIndexType arc) const
Definition: ebert_graph.h:1384
ArcIndexType Opposite(const ArcIndexType arc) const
Definition: ebert_graph.h:1409
IncomingArcIterator(const EbertGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:1309
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:279
OutgoingArcIterator(const DerivedGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:368
TailArrayManager(GraphType *g)
Definition: ebert_graph.h:1918
ArcIndexType end_arc_index() const
Definition: ebert_graph.h:252
bool BuildTailArray() const
Definition: ebert_graph.h:1875
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:763
void SetSeen(ArcIndexType *permutation_element) const override
Definition: ebert_graph.h:1087
void ReleaseTailArray() const
Definition: ebert_graph.h:1898
bool Reserve(const typename GraphType::NodeIndex new_max_num_nodes, const typename GraphType::ArcIndex new_max_num_arcs)
Definition: ebert_graph.h:2031
bool representation_clean_
Definition: ebert_graph.h:1152
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:222
ArcIndexType NextOutgoingArc(const NodeIndexType node, ArcIndexType arc) const
Definition: ebert_graph.h:788
NodeIndexType max_num_nodes() const
Definition: ebert_graph.h:255
std::string NodeDebugString(const NodeIndexType node) const
Definition: ebert_graph.h:302
~ForwardEbertGraph()
Definition: ebert_graph.h:1607
static constexpr bool has_reverse_arcs
Definition: ebert_graph.h:1849
Definition: christofides.h:33
NodeIndexType end_node_index() const
Definition: ebert_graph.h:247
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:222
GraphType * Graph(PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler)
Definition: ebert_graph.h:1991
bool CheckTailIndexValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1625
NodeIndexType num_nodes() const
Definition: ebert_graph.h:237
static const ArcIndexType kMaxNumArcs
Definition: ebert_graph.h:235
ArcIterator(const DerivedGraph &graph)
Definition: ebert_graph.h:345
ZVector< FlowQuantity > QuantityArray
Definition: ebert_graph.h:209
std::string DebugString() const
Definition: ebert_graph.h:1698
bool operator()(ArcIndexType a, ArcIndexType b) const
Definition: ebert_graph.h:525
void SetIndexFromIndex(ArcIndexType source, ArcIndexType destination) const override
Definition: ebert_graph.h:586
EbertGraph(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1228
ForwardEbertGraph< NodeIndex, ArcIndex > ForwardStarGraph
Definition: ebert_graph.h:205
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:279
void operator=(const OutgoingOrOppositeIncomingArcIterator &iterator)
Definition: ebert_graph.h:1259
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:222
bool BuildTailArray()
Definition: ebert_graph.h:1656
ArcIndexType end_arc_index() const
Definition: ebert_graph.h:252
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:279
static const NodeIndexType kNilNode
Definition: ebert_graph.h:216
TailArrayReleaser(GraphType *graph)
Definition: ebert_graph.h:1906
void BuildRepresentation()
Definition: ebert_graph.h:1448
ArcIndexType max_num_arcs_
Definition: ebert_graph.h:489
ArcIndexType Index() const
Definition: ebert_graph.h:1275
TailArrayReleaser(GraphType *unused_graph)
Definition: ebert_graph.h:1896
NodeIndexType Head(const ArcIndexType arc) const
Definition: ebert_graph.h:297
static const ArcIndexType kNilArc
Definition: ebert_graph.h:219
ArcIndexType Index() const
Definition: ebert_graph.h:402
ArcIndexType max_num_arcs_
Definition: ebert_graph.h:489
static const NodeIndexType kNilNode
Definition: ebert_graph.h:216
static const NodeIndexType kMaxNumNodes
Definition: ebert_graph.h:230
TailArrayBuilder(GraphType *unused_graph)
Definition: ebert_graph.h:1873
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:778
ZVector< NodeIndexType > head_
Definition: ebert_graph.h:498
ZVector< ArcIndexType > next_adjacent_arc_
Definition: ebert_graph.h:1147
ArcIndexType NextOutgoingArc(const NodeIndexType unused_node, const ArcIndexType arc) const
Definition: ebert_graph.h:1138
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1435
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1620
ForwardStaticGraph< NodeIndex, ArcIndex > ForwardStarStaticGraph
Definition: ebert_graph.h:206
bool Unseen(ArcIndexType permutation_element) const override
Definition: ebert_graph.h:1091
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:279
bool Ok() const
Definition: ebert_graph.h:1266
ArcIndexType Index() const
Definition: ebert_graph.h:1335
ArcIndexType LookUpArc(const NodeIndexType tail, const NodeIndexType head) const
Definition: ebert_graph.h:285
void operator=(const OutgoingArcIterator &iterator)
Definition: ebert_graph.h:386
ArcIndexType DirectArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1396
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1638
static const NodeIndexType kMaxNumNodes
Definition: ebert_graph.h:230
void operator=(const IncomingArcIterator &iterator)
Definition: ebert_graph.h:1319
bool CheckTailIndexValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:783
ArcIndexType NextAdjacentArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1131
ArcIndexType StartArc(ArcIndexType arc) const
Definition: ebert_graph.h:445
GraphType::ArcIndex AddArc(const typename GraphType::NodeIndex tail, const typename GraphType::NodeIndex head)
Definition: ebert_graph.h:2036
void GroupForwardArcsByFunctor(const ArcIndexTypeStrictWeakOrderingFunctor &compare, PermutationCycleHandler< ArcIndexType > *annotation_handler)
Definition: ebert_graph.h:1022
static const ArcIndexType kNilArc
Definition: ebert_graph.h:219
NodeIndexType Index() const
Definition: ebert_graph.h:332
GraphBuilderFromArcs(typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs)
Definition: ebert_graph.h:2025
bool BuildTailArray() const
Definition: ebert_graph.h:1885
ZVector< ArcIndexType > first_incident_arc_
Definition: ebert_graph.h:502
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:222
OutgoingOrOppositeIncomingArcIterator(const EbertGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:1239
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1371
bool IsDirect(const ArcIndexType arc) const
Definition: ebert_graph.h:1417
GraphType * Graph(PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler)
Definition: ebert_graph.h:2042
void BuildRepresentation()
Definition: ebert_graph.h:1646
bool IsOutgoing(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1440
void Next()
Definition: ebert_graph.h:1269
std::string DebugString() const
Definition: ebert_graph.h:802
NodeIndexType NodeIndex
Definition: ebert_graph.h:1598
GraphType *const graph_
Definition: ebert_graph.h:1910
void Next()
Definition: ebert_graph.h:396
GraphType *const graph_
Definition: ebert_graph.h:1887
void SetTempFromIndex(ArcIndexType source) override
Definition: ebert_graph.h:581
OutgoingArcIterator(const DerivedGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:377
AnnotatedGraphBuildManager(typename GraphType::NodeIndex num_nodes, typename GraphType::ArcIndex num_arcs, bool sort_arcs)
Definition: ebert_graph.h:2068
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:1376
bool IsReverse(const ArcIndexType arc) const
Definition: ebert_graph.h:1423
void SetIndexFromTemp(ArcIndexType destination) const override
Definition: ebert_graph.h:1075
ZVector< NodeIndexType > head_
Definition: ebert_graph.h:498
std::string ArcDebugString(const ArcIndexType arc) const
Definition: ebert_graph.h:310
bool Ok() const
Definition: ebert_graph.h:1326
ArcIndexType FirstOutgoingArc(const NodeIndexType node) const
Definition: ebert_graph.h:479
NodeIndexType max_end_node_index() const
Definition: ebert_graph.h:264
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:225
CycleHandlerForAnnotatedArcs(PermutationCycleHandler< ArcIndexType > *annotation_handler, DerivedGraph *graph)
Definition: ebert_graph.h:1050
NodeIndexType NextNode(const NodeIndexType node) const
Definition: ebert_graph.h:458
std::string DebugString() const
Definition: ebert_graph.h:1458
ArcIndexType num_arcs() const
Definition: ebert_graph.h:241
void Initialize(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1112
static constexpr bool is_dynamic
Definition: ebert_graph.h:1850
NodeIndexType max_num_nodes_
Definition: ebert_graph.h:486
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:225
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:1612
Definition: ebert_graph.h:1237
void ReleaseTailArray()
Definition: ebert_graph.h:1684
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:225
NodeIndexType num_nodes_
Definition: ebert_graph.h:492
static const ArcIndexType kNilArc
Definition: ebert_graph.h:219
ArcIndexType ReverseArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1402
static const NodeIndexType kNilNode
Definition: ebert_graph.h:216
NodeIndexType DirectArcHead(const ArcIndexType arc) const
Definition: ebert_graph.h:1391
bool TailArrayComplete() const
Definition: ebert_graph.h:1687
GraphBuilderFromArcs(typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs)
Definition: ebert_graph.h:1965
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:1363
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:756
void ReleaseTailArray()
Definition: ebert_graph.h:844
void SetIndexFromTemp(ArcIndexType destination) const override
Definition: ebert_graph.h:592
ArcIndexType max_num_arcs() const
Definition: ebert_graph.h:259
static const ArcIndexType kNilArc
Definition: ebert_graph.h:219
bool TailArrayComplete() const
Definition: ebert_graph.h:847
bool BuildTailArrayFromAdjacencyListsIfForwardGraph() const
Definition: ebert_graph.h:1920
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:225
static const ArcIndexType kMaxNumArcs
Definition: ebert_graph.h:235
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:279
EbertGraph< NodeIndex, ArcIndex > StarGraph
Definition: ebert_graph.h:204
PermutationIndexComparisonByArcHead(const ZVector< NodeIndexType > &head)
Definition: ebert_graph.h:521
void ReleaseTailArray() const
Definition: ebert_graph.h:1908
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:225
bool Reserve(NodeIndexType new_max_num_nodes, ArcIndexType new_max_num_arcs)
Definition: ebert_graph.h:978
bool BuildLineGraph(const GraphType &graph, GraphType *const line_graph)
Definition: ebert_graph.h:2088
ArcFunctorOrderingByTailAndHead(const GraphType &graph)
Definition: ebert_graph.h:1941
void SetIndexFromIndex(ArcIndexType source, ArcIndexType destination) const override
Definition: ebert_graph.h:1066
bool operator()(typename GraphType::ArcIndex a, typename GraphType::ArcIndex b) const
Definition: ebert_graph.h:1944
void ReleaseTailArrayIfForwardGraph() const
Definition: ebert_graph.h:1927
ZVector< ArcIndexType > first_incident_arc_
Definition: ebert_graph.h:502
OutgoingOrOppositeIncomingArcIterator(const EbertGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:1250
ArcIndexType FirstOutgoingOrOppositeIncomingArc(const NodeIndexType node) const
Definition: ebert_graph.h:1123
~CycleHandlerForAnnotatedArcs() override
Definition: ebert_graph.h:1095
GraphType::ArcIndex AddArc(typename GraphType::NodeIndex tail, typename GraphType::NodeIndex head)
Definition: ebert_graph.h:1972
NodeIndexType Head(const ArcIndexType arc) const
Definition: ebert_graph.h:297