C++ Reference
C++ Reference: Graph
ebert_graph.h
Go to the documentation of this file.
NodeIndexType NodeIndex
Definition: ebert_graph.h:565
GraphType * Graph(PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler)
Definition: ebert_graph.h:2043
NodeIndexType max_num_nodes_
Definition: ebert_graph.h:487
CycleHandlerForAnnotatedArcs(PermutationCycleHandler< ArcIndexType > *annotation_handler, DerivedGraph *graph)
Definition: ebert_graph.h:1051
NodeIndexType num_nodes_
Definition: ebert_graph.h:493
std::string NodeDebugString(const NodeIndexType node) const
Definition: ebert_graph.h:303
NodeIndexType Index() const
Definition: ebert_graph.h:333
bool operator()(ArcIndexType a, ArcIndexType b) const
Definition: ebert_graph.h:526
ArcIndexType Index() const
Definition: ebert_graph.h:403
ArcIndexType max_end_arc_index() const
Definition: ebert_graph.h:272
ArcIndexType num_arcs_
Definition: ebert_graph.h:496
ArcIndexType FirstOutgoingOrOppositeIncomingArc(const NodeIndexType node) const
Definition: ebert_graph.h:1124
void ReleaseTailArray() const
Definition: ebert_graph.h:1909
bool BuildTailArray() const
Definition: ebert_graph.h:1876
void SetIndexFromIndex(ArcIndexType source, ArcIndexType destination) const override
Definition: ebert_graph.h:587
NodeIndexType StartNode(NodeIndexType node) const
Definition: ebert_graph.h:440
void BuildRepresentation()
Definition: ebert_graph.h:1647
void SetTempFromIndex(ArcIndexType source) override
Definition: ebert_graph.h:582
ZVector< ArcIndexType > first_incident_arc_
Definition: ebert_graph.h:503
CycleHandlerForAnnotatedArcs(PermutationCycleHandler< ArcIndexType > *annotation_handler, NodeIndexType *data)
Definition: ebert_graph.h:576
OutgoingArcIterator(const DerivedGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:378
bool BuildTailArray()
Definition: ebert_graph.h:1657
AnnotatedGraphBuildManager(typename GraphType::NodeIndex num_nodes, typename GraphType::ArcIndex num_arcs, bool sort_arcs)
Definition: ebert_graph.h:2069
ZVector< ArcIndexType > next_adjacent_arc_
Definition: ebert_graph.h:1148
ZVector< NodeIndexType > head_
Definition: ebert_graph.h:499
GraphType::ArcIndex AddArc(const typename GraphType::NodeIndex tail, const typename GraphType::NodeIndex head)
Definition: ebert_graph.h:2037
NodeIndexType max_num_nodes_
Definition: ebert_graph.h:487
OutgoingOrOppositeIncomingArcIterator(const EbertGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:1251
bool Unseen(ArcIndexType permutation_element) const override
Definition: ebert_graph.h:1092
void SetIndexFromIndex(ArcIndexType source, ArcIndexType destination) const override
Definition: ebert_graph.h:1067
void SetIndexFromTemp(ArcIndexType destination) const override
Definition: ebert_graph.h:593
void Initialize(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1113
ArcIterator(const DerivedGraph &graph)
Definition: ebert_graph.h:346
ArcIndexType NextOutgoingArc(const NodeIndexType unused_node, const ArcIndexType arc) const
Definition: ebert_graph.h:1139
bool TailArrayComplete() const
Definition: ebert_graph.h:1688
GraphType *const graph_
Definition: ebert_graph.h:1888
Definition: ebert_graph.h:1238
bool BuildTailArray()
Definition: ebert_graph.h:817
NodeIndexType max_num_nodes() const
Definition: ebert_graph.h:256
ArcIndexType DirectArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1397
ForwardEbertGraph(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1604
ArcIndexType StartArc(ArcIndexType arc) const
Definition: ebert_graph.h:446
void GroupForwardArcsByFunctor(const ArcIndexTypeStrictWeakOrderingFunctor &compare, PermutationCycleHandler< ArcIndexType > *annotation_handler)
Definition: ebert_graph.h:1023
void SetTempFromIndex(ArcIndexType source) override
Definition: ebert_graph.h:1059
~ForwardEbertGraph()
Definition: ebert_graph.h:1608
void ReleaseTailArray() const
Definition: ebert_graph.h:1899
void operator=(const OutgoingArcIterator &iterator)
Definition: ebert_graph.h:387
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:226
NodeIndexType DirectArcHead(const ArcIndexType arc) const
Definition: ebert_graph.h:1392
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:622
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:223
GraphBuilderFromArcs(typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs)
Definition: ebert_graph.h:2026
bool IsReverse(const ArcIndexType arc) const
Definition: ebert_graph.h:1424
ZVector< FlowQuantity > QuantityArray
Definition: ebert_graph.h:210
IncomingArcIterator(const EbertGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:1301
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:1364
void Next()
Definition: ebert_graph.h:397
bool IsDirect(const ArcIndexType arc) const
Definition: ebert_graph.h:1418
bool CheckTailIndexValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:784
void ReleaseTailArrayIfForwardGraph() const
Definition: ebert_graph.h:1928
TailArrayBuilder(GraphType *unused_graph)
Definition: ebert_graph.h:1874
bool BuildTailArrayFromAdjacencyListsIfForwardGraph() const
Definition: ebert_graph.h:1921
static constexpr bool has_reverse_arcs
Definition: ebert_graph.h:1850
bool Reserve(NodeIndexType new_max_num_nodes, ArcIndexType new_max_num_arcs)
Definition: ebert_graph.h:979
std::string DebugString() const
Definition: ebert_graph.h:1459
ArcIndexType max_num_arcs() const
Definition: ebert_graph.h:260
NodeIterator(const DerivedGraph &graph)
Definition: ebert_graph.h:323
ZVector< NodeIndexType > head_
Definition: ebert_graph.h:499
std::string ArcDebugString(const ArcIndexType arc) const
Definition: ebert_graph.h:311
bool BuildLineGraph(const GraphType &graph, GraphType *const line_graph)
Definition: ebert_graph.h:2089
bool IsOutgoingOrOppositeIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1430
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:280
NodeIndexType DirectArcTail(const ArcIndexType arc) const
Definition: ebert_graph.h:1385
ArcIndexType LookUpArc(const NodeIndexType tail, const NodeIndexType head) const
Definition: ebert_graph.h:286
static const NodeIndexType kNilNode
Definition: ebert_graph.h:217
ArcIndexType Opposite(const ArcIndexType arc) const
Definition: ebert_graph.h:1410
ArcIndexType Index() const
Definition: ebert_graph.h:1336
ArcIndexType max_num_arcs_
Definition: ebert_graph.h:490
IncomingArcIterator(const EbertGraph &graph, NodeIndexType node, ArcIndexType arc)
Definition: ebert_graph.h:1310
bool IsOutgoing(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1441
void BuildRepresentation()
Definition: ebert_graph.h:1449
bool IsNodeValid(NodeIndexType node) const
Definition: ebert_graph.h:280
TailArrayBuilder(GraphType *graph)
Definition: ebert_graph.h:1884
bool operator()(typename GraphType::ArcIndex a, typename GraphType::ArcIndex b) const
Definition: ebert_graph.h:1945
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1372
std::string DebugString() const
Definition: ebert_graph.h:1699
static const ArcIndexType kMaxNumArcs
Definition: ebert_graph.h:236
EbertGraph(NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
Definition: ebert_graph.h:1229
bool TailArrayComplete() const
Definition: ebert_graph.h:848
ForwardEbertGraph()
Definition: ebert_graph.h:1602
void Next()
Definition: ebert_graph.h:1270
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:771
static const ArcIndexType kNilArc
Definition: ebert_graph.h:220
bool Ok() const
Definition: ebert_graph.h:1267
TailArrayReleaser(GraphType *graph)
Definition: ebert_graph.h:1907
std::string DebugString() const
Definition: ebert_graph.h:803
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1639
static const NodeIndexType kMaxNumNodes
Definition: ebert_graph.h:231
ArcIndexType FirstOutgoingArc(const NodeIndexType node) const
Definition: ebert_graph.h:480
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:779
static const NodeIndexType kFirstNode
Definition: ebert_graph.h:223
TailArrayReleaser(GraphType *unused_graph)
Definition: ebert_graph.h:1897
~CycleHandlerForAnnotatedArcs() override
Definition: ebert_graph.h:1096
void operator=(const OutgoingOrOppositeIncomingArcIterator &iterator)
Definition: ebert_graph.h:1260
ArcIndexType max_num_arcs_
Definition: ebert_graph.h:490
static const NodeIndexType kNilNode
Definition: ebert_graph.h:217
bool representation_clean_
Definition: ebert_graph.h:1153
bool Ok() const
Definition: ebert_graph.h:1327
NodeIndexType max_end_node_index() const
Definition: ebert_graph.h:265
ArcIndexType NextAdjacentArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1132
void ReleaseTailArray()
Definition: ebert_graph.h:1685
void SetIndexFromTemp(ArcIndexType destination) const override
Definition: ebert_graph.h:1076
void operator=(const IncomingArcIterator &iterator)
Definition: ebert_graph.h:1320
bool Ok() const
Definition: ebert_graph.h:394
void ReleaseTailArray()
Definition: ebert_graph.h:845
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:1377
bool BuildTailArray() const
Definition: ebert_graph.h:1886
void SetSeen(ArcIndexType *permutation_element) const override
Definition: ebert_graph.h:1088
ArcIndexType AddArc(NodeIndexType tail, NodeIndexType head)
Definition: ebert_graph.h:1002
ArcIndexType NextOutgoingArc(const NodeIndexType node, ArcIndexType arc) const
Definition: ebert_graph.h:789
Definition: christofides.h:43
bool CheckArcValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1621
GraphBuilderFromArcs(typename GraphType::NodeIndex max_num_nodes, typename GraphType::ArcIndex max_num_arcs, bool sort_arcs)
Definition: ebert_graph.h:1966
EbertGraph< NodeIndex, ArcIndex > StarGraph
Definition: ebert_graph.h:205
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:1632
ArcIndexType Index() const
Definition: ebert_graph.h:1276
ArcIndexType num_arcs() const
Definition: ebert_graph.h:242
static const ArcIndexType kNilArc
Definition: ebert_graph.h:220
ForwardStaticGraph< NodeIndex, ArcIndex > ForwardStarStaticGraph
Definition: ebert_graph.h:207
static constexpr bool is_dynamic
Definition: ebert_graph.h:1851
Definition: ebert_graph.h:189
GraphType * Graph(PermutationCycleHandler< typename GraphType::ArcIndex > *client_cycle_handler)
Definition: ebert_graph.h:1992
OutgoingArcIterator(const DerivedGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:369
PermutationIndexComparisonByArcHead(const ZVector< NodeIndexType > &head)
Definition: ebert_graph.h:522
ForwardEbertGraph< NodeIndex, ArcIndex > ForwardStarGraph
Definition: ebert_graph.h:206
NodeIndexType end_node_index() const
Definition: ebert_graph.h:248
TailArrayManager(GraphType *g)
Definition: ebert_graph.h:1919
ArcFunctorOrderingByTailAndHead(const GraphType &graph)
Definition: ebert_graph.h:1942
OutgoingOrOppositeIncomingArcIterator(const EbertGraph &graph, NodeIndexType node)
Definition: ebert_graph.h:1240
bool CheckArcBounds(const ArcIndexType arc) const
Definition: ebert_graph.h:1613
NodeIndexType NodeIndex
Definition: ebert_graph.h:1599
NodeIndexType Tail(const ArcIndexType arc) const
Definition: ebert_graph.h:757
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:764
ArcIndexType Index() const
Definition: ebert_graph.h:356
ArcIndexType ReverseArc(const ArcIndexType arc) const
Definition: ebert_graph.h:1403
NodeIndexType num_nodes() const
Definition: ebert_graph.h:238
ZVector< ArcIndexType > first_incident_arc_
Definition: ebert_graph.h:503
bool Reserve(const typename GraphType::NodeIndex new_max_num_nodes, const typename GraphType::ArcIndex new_max_num_arcs)
Definition: ebert_graph.h:2032
bool IsIncoming(ArcIndexType arc, NodeIndexType node) const
Definition: ebert_graph.h:1436
ArcIndexType end_arc_index() const
Definition: ebert_graph.h:253
static const ArcIndexType kFirstArc
Definition: ebert_graph.h:226
NodeIndexType Head(const ArcIndexType arc) const
Definition: ebert_graph.h:298
GraphType *const graph_
Definition: ebert_graph.h:1911
NodeIndexType NextNode(const NodeIndexType node) const
Definition: ebert_graph.h:459
bool CheckTailIndexValidity(const ArcIndexType arc) const
Definition: ebert_graph.h:1626
ArcIndexType NextArc(const ArcIndexType arc) const
Definition: ebert_graph.h:473
GraphType::ArcIndex AddArc(typename GraphType::NodeIndex tail, typename GraphType::NodeIndex head)
Definition: ebert_graph.h:1973