OR-Tools  9.1
CompleteGraph< NodeIndexType, ArcIndexType >

Detailed Description

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
class util::CompleteGraph< NodeIndexType, ArcIndexType >

Definition at line 2177 of file graph.h.

Public Types

typedef NodeIndexType NodeIndex
 
typedef ArcIndexType ArcIndex
 

Public Member Functions

 CompleteGraph (NodeIndexType num_nodes)
 
NodeIndexType Head (ArcIndexType arc) const
 
NodeIndexType Tail (ArcIndexType arc) const
 
ArcIndexType OutDegree (NodeIndexType node) const
 
IntegerRange< ArcIndexType > OutgoingArcs (NodeIndexType node) const
 
IntegerRange< ArcIndexType > OutgoingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
 
IntegerRange< NodeIndexType > operator[] (NodeIndexType node) const
 
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 ()
 
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 192 of file graph.h.

◆ NodeIndex

typedef NodeIndexType NodeIndex
inherited

Definition at line 191 of file graph.h.

Constructor & Destructor Documentation

◆ CompleteGraph()

CompleteGraph ( NodeIndexType  num_nodes)
inlineexplicit

Definition at line 2187 of file graph.h.

Member Function Documentation

◆ AllForwardArcs()

IntegerRange< ArcIndexType > AllForwardArcs ( ) const
inherited

Definition at line 942 of file graph.h.

◆ AllNodes()

IntegerRange< NodeIndexType > AllNodes ( ) const
inherited

Definition at line 936 of file graph.h.

◆ arc_capacity()

ArcIndexType arc_capacity ( ) const
inherited

Definition at line 966 of file graph.h.

◆ BuildStartAndForwardHead()

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

Definition at line 1002 of file graph.h.

◆ ComputeCumulativeSum()

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

Definition at line 985 of file graph.h.

◆ FreezeCapacities()

void FreezeCapacities ( )
inherited

Definition at line 973 of file graph.h.

◆ GroupForwardArcsByFunctor()

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

Definition at line 266 of file graph.h.

◆ Head()

NodeIndexType Head ( ArcIndexType  arc) const

Definition at line 2204 of file graph.h.

◆ IsArcValid()

bool IsArcValid ( ArcIndexType  arc) const
inlineinherited

Definition at line 221 of file graph.h.

◆ IsNodeValid()

bool IsNodeValid ( NodeIndexType  node) const
inlineinherited

Definition at line 215 of file graph.h.

◆ max_end_arc_index()

ArcIndexType max_end_arc_index ( ) const
inlineinherited

Definition at line 269 of file graph.h.

◆ node_capacity()

NodeIndexType node_capacity ( ) const
inherited

Definition at line 958 of file graph.h.

◆ num_arcs()

ArcIndexType num_arcs ( ) const
inlineinherited

Definition at line 206 of file graph.h.

◆ num_nodes()

NodeIndexType num_nodes ( ) const
inlineinherited

Definition at line 203 of file graph.h.

◆ operator[]()

IntegerRange< NodeIndexType > operator[] ( NodeIndexType  node) const

Definition at line 2244 of file graph.h.

◆ OutDegree()

ArcIndexType OutDegree ( NodeIndexType  node) const

Definition at line 2218 of file graph.h.

◆ OutgoingArcs()

IntegerRange< ArcIndexType > OutgoingArcs ( NodeIndexType  node) const

Definition at line 2225 of file graph.h.

◆ OutgoingArcsStartingFrom()

IntegerRange< ArcIndexType > OutgoingArcsStartingFrom ( NodeIndexType  node,
ArcIndexType  from 
) const

Definition at line 2235 of file graph.h.

◆ Reserve()

void Reserve ( NodeIndexType  node_capacity,
ArcIndexType  arc_capacity 
)
inlineinherited

Definition at line 249 of file graph.h.

◆ ReserveArcs()

virtual void ReserveArcs ( ArcIndexType  bound)
inlinevirtualinherited

◆ ReserveNodes()

virtual void ReserveNodes ( NodeIndexType  bound)
inlinevirtualinherited

◆ Tail()

NodeIndexType Tail ( ArcIndexType  arc) const

Definition at line 2211 of file graph.h.

Member Data Documentation

◆ arc_capacity_

ArcIndexType arc_capacity_
protectedinherited

Definition at line 281 of file graph.h.

◆ const_capacities_

bool const_capacities_
protectedinherited

Definition at line 282 of file graph.h.

◆ kNilArc

const ArcIndexType kNilArc
staticinherited

Definition at line 261 of file graph.h.

◆ kNilNode

const NodeIndexType kNilNode
staticinherited

Definition at line 260 of file graph.h.

◆ node_capacity_

NodeIndexType node_capacity_
protectedinherited

Definition at line 279 of file graph.h.

◆ num_arcs_

ArcIndexType num_arcs_
protectedinherited

Definition at line 280 of file graph.h.

◆ num_nodes_

NodeIndexType num_nodes_
protectedinherited

Definition at line 278 of file graph.h.


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