C++ Reference

C++ Reference: Graph

BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >

Detailed Description

template<typename NodeIndexType = int32, typename ArcIndexType = int32, bool HasReverseArcs = false>
class util::BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >

Definition at line 184 of file graph.h.

Public Types

typedef NodeIndexType NodeIndex
 
typedef ArcIndexType ArcIndex
 

Public Member Functions

 BaseGraph ()
 
virtual ~BaseGraph ()
 
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
 
virtual void ReserveNodes (NodeIndexType bound)
 
virtual void ReserveArcs (ArcIndexType bound)
 
void Reserve (NodeIndexType node_capacity, ArcIndexType arc_capacity)
 
void FreezeCapacities ()
 
template<typename A , typename B >
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

Definition at line 190 of file graph.h.

◆ NodeIndex

typedef NodeIndexType NodeIndex

Definition at line 189 of file graph.h.

Constructor & Destructor Documentation

◆ BaseGraph()

BaseGraph ( )
inline

Definition at line 192 of file graph.h.

◆ ~BaseGraph()

virtual ~BaseGraph ( )
inlinevirtual

Definition at line 198 of file graph.h.

Member Function Documentation

◆ AllForwardArcs()

IntegerRange< ArcIndexType > AllForwardArcs

Definition at line 935 of file graph.h.

◆ AllNodes()

IntegerRange< NodeIndexType > AllNodes

Definition at line 929 of file graph.h.

◆ arc_capacity()

ArcIndexType arc_capacity

Definition at line 959 of file graph.h.

◆ BuildStartAndForwardHead()

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

Definition at line 994 of file graph.h.

◆ ComputeCumulativeSum()

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

Definition at line 977 of file graph.h.

◆ FreezeCapacities()

void FreezeCapacities

Definition at line 966 of file graph.h.

◆ GroupForwardArcsByFunctor()

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

Definition at line 264 of file graph.h.

◆ IsArcValid()

bool IsArcValid ( ArcIndexType  arc) const
inline

Definition at line 219 of file graph.h.

◆ IsNodeValid()

bool IsNodeValid ( NodeIndexType  node) const
inline

Definition at line 213 of file graph.h.

◆ max_end_arc_index()

ArcIndexType max_end_arc_index ( ) const
inline

Definition at line 267 of file graph.h.

◆ node_capacity()

NodeIndexType node_capacity

Definition at line 951 of file graph.h.

◆ num_arcs()

ArcIndexType num_arcs ( ) const
inline

Definition at line 204 of file graph.h.

◆ num_nodes()

NodeIndexType num_nodes ( ) const
inline

Definition at line 201 of file graph.h.

◆ Reserve()

void Reserve ( NodeIndexType  node_capacity,
ArcIndexType  arc_capacity 
)
inline

Definition at line 247 of file graph.h.

◆ ReserveArcs()

virtual void ReserveArcs ( ArcIndexType  bound)
inlinevirtual

Definition at line 241 of file graph.h.

◆ ReserveNodes()

virtual void ReserveNodes ( NodeIndexType  bound)
inlinevirtual

Definition at line 235 of file graph.h.

Member Data Documentation

◆ arc_capacity_

ArcIndexType arc_capacity_
protected

Definition at line 279 of file graph.h.

◆ const_capacities_

bool const_capacities_
protected

Definition at line 280 of file graph.h.

◆ kNilArc

const ArcIndexType kNilArc
static
Initial value:
=
std::numeric_limits<ArcIndexType>::max()

Definition at line 259 of file graph.h.

◆ kNilNode

const NodeIndexType kNilNode
static
Initial value:
=
std::numeric_limits<NodeIndexType>::max()

Definition at line 258 of file graph.h.

◆ node_capacity_

NodeIndexType node_capacity_
protected

Definition at line 277 of file graph.h.

◆ num_arcs_

ArcIndexType num_arcs_
protected

Definition at line 278 of file graph.h.

◆ num_nodes_

NodeIndexType num_nodes_
protected

Definition at line 276 of file graph.h.


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