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