|
| ReverseArcStaticGraph () |
|
| ReverseArcStaticGraph (NodeIndexType num_nodes, ArcIndexType arc_capacity) |
|
ArcIndexType | OutDegree (NodeIndexType node) const |
| ReverseArcStaticGraph<>::OutDegree() and InDegree() work in O(1).
|
|
ArcIndexType | InDegree (NodeIndexType node) const |
|
BeginEndWrapper< OutgoingArcIterator > | OutgoingArcs (NodeIndexType node) const |
|
BeginEndWrapper< IncomingArcIterator > | IncomingArcs (NodeIndexType node) const |
|
BeginEndWrapper< OutgoingOrOppositeIncomingArcIterator > | OutgoingOrOppositeIncomingArcs (NodeIndexType node) const |
|
BeginEndWrapper< OppositeIncomingArcIterator > | OppositeIncomingArcs (NodeIndexType node) const |
|
BeginEndWrapper< OutgoingArcIterator > | OutgoingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const |
|
BeginEndWrapper< IncomingArcIterator > | IncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const |
|
BeginEndWrapper< OutgoingOrOppositeIncomingArcIterator > | OutgoingOrOppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const |
|
BeginEndWrapper< OppositeIncomingArcIterator > | OppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const |
|
absl::Span< const NodeIndexType > | operator[] (NodeIndexType node) const |
|
ArcIndexType | OppositeArc (ArcIndexType arc) const |
|
NodeIndexType | Head (ArcIndexType arc) const |
|
NodeIndexType | Tail (ArcIndexType arc) const |
|
void | ReserveArcs (ArcIndexType bound) override |
|
void | AddNode (NodeIndexType node) |
|
ArcIndexType | AddArc (NodeIndexType tail, NodeIndexType head) |
|
void | Build () |
|
void | Build (std::vector< ArcIndexType > *permutation) |
|
bool | IsArcValid (ArcIndexType arc) const |
|
| BaseGraph () |
|
| BaseGraph (const BaseGraph &)=default |
|
BaseGraph & | operator= (const BaseGraph &)=default |
|
virtual | ~BaseGraph ()=default |
|
int32_t | num_nodes () const |
|
int32_t | size () const |
|
int32_t | num_arcs () const |
| Returns the number of valid arcs in the graph.
|
|
IntegerRange< NodeIndex > | AllNodes () const |
| BaseGraph implementation -------------------------------------------------—.
|
|
IntegerRange< ArcIndex > | AllForwardArcs () const |
|
bool | IsNodeValid (int32_t node) const |
| Returns true if the given node is a valid node of the graph.
|
|
bool | IsArcValid (int32_t arc) const |
|
int32_t | node_capacity () const |
| Capacity reserved for future nodes, always >= num_nodes_.
|
|
int32_t | arc_capacity () const |
| Capacity reserved for future arcs, always >= num_arcs_.
|
|
virtual void | ReserveNodes (int32_t bound) |
|
virtual void | ReserveArcs (int32_t bound) |
|
void | Reserve (int32_t node_capacity, int32_t arc_capacity) |
|
void | FreezeCapacities () |
|
void | GroupForwardArcsByFunctor (const A &a, B *b) |
|
int32_t | max_end_arc_index () const |
|
template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
class util::ReverseArcStaticGraph< NodeIndexType, ArcIndexType >
StaticGraph with reverse arc.
- NodeIndexType can be unsigned, but ArcIndexType must be signed.
- It has most of the same advantanges and disadvantages as StaticGraph.
- It takes 2 * ArcIndexType * node_capacity()
- If the ArcIndexPermutation is needed, then an extra ArcIndexType * arc_capacity() is needed for it.
- The reverse arcs from a node are sorted by head (so we could add a log() time lookup function).
Definition at line 566 of file graph.h.
template<typename NodeIndexType , typename ArcIndexType >
Computes incoming degree of each nodes.
Computes the reverse arcs of the forward arcs.
- Note
- this sort the reverse arcs with the same tail by head.
- Todo
- (user): the 0 is wasted here, but minor optimisation.
Computes in reverse_start_ the start index of the reverse arcs.
Fill reverse arc information.
Definition at line 1808 of file graph.h.