C++ Reference

C++ Reference: Graph

ReverseArcListGraph< NodeIndexType, ArcIndexType >

Detailed Description

template<typename NodeIndexType = int32, typename ArcIndexType = int32>
class util::ReverseArcListGraph< NodeIndexType, ArcIndexType >

Definition at line 459 of file graph.h.

Classes

class  IncomingArcIterator
 
class  OppositeIncomingArcIterator
 
class  OutgoingArcIterator
 
class  OutgoingHeadIterator
 
class  OutgoingOrOppositeIncomingArcIterator
 

Public Types

typedef NodeIndexType NodeIndex
 
typedef ArcIndexType ArcIndex
 

Public Member Functions

 ReverseArcListGraph ()
 
 ReverseArcListGraph (NodeIndexType num_nodes, ArcIndexType arc_capacity)
 
ArcIndexType OppositeArc (ArcIndexType arc) const
 
ArcIndexType OutDegree (NodeIndexType node) const
 
ArcIndexType InDegree (NodeIndexType node) const
 
BeginEndWrapper< OutgoingArcIteratorOutgoingArcs (NodeIndexType node) const
 
BeginEndWrapper< IncomingArcIteratorIncomingArcs (NodeIndexType node) const
 
BeginEndWrapper< OutgoingOrOppositeIncomingArcIteratorOutgoingOrOppositeIncomingArcs (NodeIndexType node) const
 
BeginEndWrapper< OppositeIncomingArcIteratorOppositeIncomingArcs (NodeIndexType node) const
 
BeginEndWrapper< OutgoingArcIteratorOutgoingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
 
BeginEndWrapper< IncomingArcIteratorIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
 
BeginEndWrapper< OutgoingOrOppositeIncomingArcIteratorOutgoingOrOppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
 
BeginEndWrapper< OppositeIncomingArcIteratorOppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
 
BeginEndWrapper< OutgoingHeadIteratoroperator[] (NodeIndexType node) const
 
NodeIndexType Head (ArcIndexType arc) const
 
NodeIndexType Tail (ArcIndexType arc) const
 
void ReserveNodes (NodeIndexType bound) override
 
void ReserveArcs (ArcIndexType bound) override
 
void AddNode (NodeIndexType node)
 
ArcIndexType AddArc (NodeIndexType tail, NodeIndexType head)
 
void Build ()
 
void Build (std::vector< ArcIndexType > *permutation)
 
NodeIndexType num_nodes () const
 
ArcIndexType num_arcs () const
 
IntegerRange< NodeIndexAllNodes () const
 
IntegerRange< ArcIndexAllForwardArcs () const
 
bool IsNodeValid (NodeIndexType node) const
 
bool IsArcValid (ArcIndexType arc) const
 
NodeIndexType node_capacity () const
 
ArcIndexType arc_capacity () const
 
void Reserve (NodeIndexType node_capacity, ArcIndexType arc_capacity)
 
void FreezeCapacities ()
 
void GroupForwardArcsByFunctor (const A &a, B *b)
 
ArcIndexType max_end_arc_index () const
 

Static Public Attributes

static const NodeIndexType kNilNode
 
static const ArcIndexType kNilArc
 

Protected Member Functions

void ComputeCumulativeSum (std::vector< ArcIndexType > *v)
 
void BuildStartAndForwardHead (SVector< NodeIndexType > *head, std::vector< ArcIndexType > *start, std::vector< ArcIndexType > *permutation)
 

Protected Attributes

NodeIndexType num_nodes_
 
NodeIndexType node_capacity_
 
ArcIndexType num_arcs_
 
ArcIndexType arc_capacity_
 
bool const_capacities_
 

Member Typedef Documentation

◆ ArcIndex

typedef ArcIndexType ArcIndex
inherited

Definition at line 190 of file graph.h.

◆ NodeIndex

typedef NodeIndexType NodeIndex
inherited

Definition at line 189 of file graph.h.

Constructor & Destructor Documentation

◆ ReverseArcListGraph() [1/2]

ReverseArcListGraph ( )
inline

Definition at line 470 of file graph.h.

◆ ReverseArcListGraph() [2/2]

ReverseArcListGraph ( NodeIndexType  num_nodes,
ArcIndexType  arc_capacity 
)
inline

Definition at line 471 of file graph.h.

Member Function Documentation

◆ AddArc()

ArcIndexType AddArc ( NodeIndexType  tail,
NodeIndexType  head 
)

Definition at line 1500 of file graph.h.

◆ AddNode()

void AddNode ( NodeIndexType  node)

Definition at line 1490 of file graph.h.

◆ AllForwardArcs()

IntegerRange< ArcIndexType > AllForwardArcs ( ) const
inherited

Definition at line 935 of file graph.h.

◆ AllNodes()

IntegerRange< NodeIndexType > AllNodes ( ) const
inherited

Definition at line 929 of file graph.h.

◆ arc_capacity()

ArcIndexType arc_capacity ( ) const
inherited

Definition at line 959 of file graph.h.

◆ Build() [1/2]

void Build ( )
inline

Definition at line 527 of file graph.h.

◆ Build() [2/2]

void Build ( std::vector< ArcIndexType > *  permutation)

Definition at line 1514 of file graph.h.

◆ BuildStartAndForwardHead()

void BuildStartAndForwardHead ( SVector< NodeIndexType > *  head,
std::vector< ArcIndexType > *  start,
std::vector< ArcIndexType > *  permutation 
)
protectedinherited

Definition at line 995 of file graph.h.

◆ ComputeCumulativeSum()

void ComputeCumulativeSum ( std::vector< ArcIndexType > *  v)
protectedinherited

Definition at line 978 of file graph.h.

◆ FreezeCapacities()

void FreezeCapacities ( )
inherited

Definition at line 966 of file graph.h.

◆ GroupForwardArcsByFunctor()

void GroupForwardArcsByFunctor ( const A &  a,
B *  b 
)
inlineinherited

Definition at line 264 of file graph.h.

◆ Head()

NodeIndexType Head ( ArcIndexType  arc) const

Definition at line 1459 of file graph.h.

◆ IncomingArcs()

BeginEndWrapper<IncomingArcIterator> IncomingArcs ( NodeIndexType  node) const

◆ IncomingArcsStartingFrom()

BeginEndWrapper<IncomingArcIterator> IncomingArcsStartingFrom ( NodeIndexType  node,
ArcIndexType  from 
) const

◆ InDegree()

ArcIndexType InDegree ( NodeIndexType  node) const

Definition at line 1444 of file graph.h.

◆ IsArcValid()

bool IsArcValid ( ArcIndexType  arc) const
inlineinherited

Definition at line 219 of file graph.h.

◆ IsNodeValid()

bool IsNodeValid ( NodeIndexType  node) const
inlineinherited

Definition at line 213 of file graph.h.

◆ max_end_arc_index()

ArcIndexType max_end_arc_index ( ) const
inlineinherited

Definition at line 267 of file graph.h.

◆ node_capacity()

NodeIndexType node_capacity ( ) const
inherited

Definition at line 951 of file graph.h.

◆ num_arcs()

ArcIndexType num_arcs ( ) const
inlineinherited

Definition at line 204 of file graph.h.

◆ num_nodes()

NodeIndexType num_nodes ( ) const
inlineinherited

Definition at line 201 of file graph.h.

◆ operator[]()

BeginEndWrapper< typename ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingHeadIterator > operator[] ( NodeIndexType  node) const

Definition at line 1428 of file graph.h.

◆ OppositeArc()

ArcIndexType OppositeArc ( ArcIndexType  arc) const

Definition at line 1452 of file graph.h.

◆ OppositeIncomingArcs()

BeginEndWrapper<OppositeIncomingArcIterator> OppositeIncomingArcs ( NodeIndexType  node) const

◆ OppositeIncomingArcsStartingFrom()

BeginEndWrapper<OppositeIncomingArcIterator> OppositeIncomingArcsStartingFrom ( NodeIndexType  node,
ArcIndexType  from 
) const

◆ OutDegree()

ArcIndexType OutDegree ( NodeIndexType  node) const

Definition at line 1436 of file graph.h.

◆ OutgoingArcs()

BeginEndWrapper<OutgoingArcIterator> OutgoingArcs ( NodeIndexType  node) const

◆ OutgoingArcsStartingFrom()

BeginEndWrapper<OutgoingArcIterator> OutgoingArcsStartingFrom ( NodeIndexType  node,
ArcIndexType  from 
) const

◆ OutgoingOrOppositeIncomingArcs()

BeginEndWrapper<OutgoingOrOppositeIncomingArcIterator> OutgoingOrOppositeIncomingArcs ( NodeIndexType  node) const

◆ OutgoingOrOppositeIncomingArcsStartingFrom()

BeginEndWrapper<OutgoingOrOppositeIncomingArcIterator> OutgoingOrOppositeIncomingArcsStartingFrom ( NodeIndexType  node,
ArcIndexType  from 
) const

◆ Reserve()

void Reserve ( NodeIndexType  node_capacity,
ArcIndexType  arc_capacity 
)
inlineinherited

Definition at line 247 of file graph.h.

◆ ReserveArcs()

void ReserveArcs ( ArcIndexType  bound)
overridevirtual

Reimplemented from BaseGraph< NodeIndexType, ArcIndexType, true >.

Definition at line 1481 of file graph.h.

◆ ReserveNodes()

void ReserveNodes ( NodeIndexType  bound)
overridevirtual

Reimplemented from BaseGraph< NodeIndexType, ArcIndexType, true >.

Definition at line 1472 of file graph.h.

◆ Tail()

NodeIndexType Tail ( ArcIndexType  arc) const

Definition at line 1466 of file graph.h.

Member Data Documentation

◆ arc_capacity_

ArcIndexType arc_capacity_
protectedinherited

Definition at line 279 of file graph.h.

◆ const_capacities_

bool const_capacities_
protectedinherited

Definition at line 280 of file graph.h.

◆ kNilArc

const ArcIndexType kNilArc
staticinherited

Definition at line 259 of file graph.h.

◆ kNilNode

const NodeIndexType kNilNode
staticinherited

Definition at line 258 of file graph.h.

◆ node_capacity_

NodeIndexType node_capacity_
protectedinherited

Definition at line 277 of file graph.h.

◆ num_arcs_

ArcIndexType num_arcs_
protectedinherited

Definition at line 278 of file graph.h.

◆ num_nodes_

NodeIndexType num_nodes_
protectedinherited

Definition at line 276 of file graph.h.


The documentation for this class was generated from the following file: