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