Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::ReverseArcListGraph< NodeIndexType, ArcIndexType > Class Template Reference

Detailed Description

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
class operations_research::ReverseArcListGraph< NodeIndexType, ArcIndexType >

Definition at line 853 of file graph.h.

#include <graph.h>

Inheritance diagram for operations_research::ReverseArcListGraph< NodeIndexType, ArcIndexType >:
util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >

Classes

struct  OutgoingArcIteratorTag
struct  OppositeIncomingArcIteratorTag
class  OutgoingOrOppositeIncomingArcIterator

Public Types

using OutgoingArcIterator
using OppositeIncomingArcIterator
using OutgoingHeadIterator
using IncomingArcIterator
Public Types inherited from util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >
typedef int32_t NodeIndex
typedef int32_t ArcIndex

Public Member Functions

 ReverseArcListGraph ()=default
 ReverseArcListGraph (NodeIndexType num_nodes, ArcIndexType arc_capacity)
NodeIndexType Head (ArcIndexType arc) const
NodeIndexType Tail (ArcIndexType arc) const
ArcIndexType OppositeArc (ArcIndexType arc) const
ArcIndexType OutDegree (NodeIndexType node) const
ArcIndexType InDegree (NodeIndexType node) const
BeginEndWrapper< OutgoingArcIteratorOutgoingArcs (NodeIndexType node) const
BeginEndWrapper< OutgoingArcIteratorOutgoingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
BeginEndWrapper< IncomingArcIteratorIncomingArcs (NodeIndexType node) const
BeginEndWrapper< IncomingArcIteratorIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
BeginEndWrapper< OutgoingOrOppositeIncomingArcIteratorOutgoingOrOppositeIncomingArcs (NodeIndexType node) const
BeginEndWrapper< OppositeIncomingArcIteratorOppositeIncomingArcs (NodeIndexType node) const
BeginEndWrapper< OppositeIncomingArcIteratorOppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
BeginEndWrapper< OutgoingOrOppositeIncomingArcIteratorOutgoingOrOppositeIncomingArcsStartingFrom (NodeIndexType node, ArcIndexType from) const
BeginEndWrapper< OutgoingHeadIteratoroperator[] (NodeIndexType node) const
void ReserveNodes (NodeIndexType bound) override
void ReserveArcs (ArcIndexType bound) override
void AddNode (NodeIndexType node)
ArcIndexType AddArc (NodeIndexType tail, NodeIndexType head)
bool IsArcValid (ArcIndexType arc) const
Public Member Functions inherited from util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >
 BaseGraph ()
BaseGraphoperator= (const BaseGraph &)=default
virtual ~BaseGraph ()=default
int32_t num_nodes () const
int32_t size () const
int32_t num_arcs () const
IntegerRange< NodeIndexAllNodes () const
IntegerRange< ArcIndexAllForwardArcs () const
bool IsNodeValid (int32_t node) const
bool IsArcValid (int32_t arc) const
int32_t node_capacity () const
int32_t arc_capacity () const
virtual void ReserveNodes (int32_t bound)
virtual void ReserveArcs (int32_t bound)
void Reserve (int32_t node_capacity, int32_t arc_capacity)
void FreezeCapacities ()
virtual void Build (std::vector< int32_t > *permutation)
virtual bool IsBuilt () const

Additional Inherited Members

Static Public Attributes inherited from util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >
static constexpr bool kHasNegativeReverseArcs
static constexpr int32_t kNilNode
static constexpr int32_t kNilArc
Protected Member Functions inherited from util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >
void ComputeCumulativeSum (internal::Vector< int32_t, int32_t > *v)
void BuildStartAndForwardHead (internal::SVector< int32_t, int32_t > *head, internal::Vector< int32_t, int32_t > *start, std::vector< int32_t > *permutation)
Protected Attributes inherited from util::BaseGraph< ReverseArcListGraph< int32_t, int32_t >, int32_t, int32_t, true >
int32_t num_nodes_
int32_t node_capacity_
int32_t num_arcs_
int32_t arc_capacity_
bool const_capacities_

Member Typedef Documentation

◆ IncomingArcIterator

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
using util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::IncomingArcIterator
Initial value:
ArcPropertyIterator< Graph, ArcIterator, typename Graph::ArcIndex, &Graph::OppositeArc > ArcOppositeArcIterator
Definition graph.h:387

Definition at line 897 of file graph.h.

◆ OppositeIncomingArcIterator

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
using util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OppositeIncomingArcIterator

◆ OutgoingArcIterator

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
using util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingArcIterator
Initial value:
ChasingIterator<ArcIndexType, Base::kNilArc, OutgoingArcIteratorTag>

Definition at line 888 of file graph.h.

◆ OutgoingHeadIterator

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
using util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingHeadIterator
Initial value:
ArcPropertyIterator< Graph, ArcIterator, typename Graph::NodeIndex, &Graph::Head > ArcHeadIterator
Definition graph.h:381

Definition at line 895 of file graph.h.

Constructor & Destructor Documentation

◆ ReverseArcListGraph() [1/2]

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::ReverseArcListGraph ( )
default

◆ ReverseArcListGraph() [2/2]

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::ReverseArcListGraph ( NodeIndexType num_nodes,
ArcIndexType arc_capacity )
inline

Definition at line 871 of file graph.h.

Member Function Documentation

◆ AddArc()

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::AddArc ( NodeIndexType tail,
NodeIndexType head )

Definition at line 1628 of file graph.h.

◆ AddNode()

template<typename NodeIndexType, typename ArcIndexType>
void util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::AddNode ( NodeIndexType node)

Definition at line 1618 of file graph.h.

◆ Head()

template<typename NodeIndexType, typename ArcIndexType>
NodeIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::Head ( ArcIndexType arc) const

Definition at line 1587 of file graph.h.

◆ IncomingArcs()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< IncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::IncomingArcs ( NodeIndexType node) const
inline

Definition at line 925 of file graph.h.

◆ IncomingArcsStartingFrom()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< IncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::IncomingArcsStartingFrom ( NodeIndexType node,
ArcIndexType from ) const
inline

Definition at line 929 of file graph.h.

◆ InDegree()

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::InDegree ( NodeIndexType node) const

Definition at line 1572 of file graph.h.

◆ IsArcValid()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
bool util::BaseGraph< ReverseArcListGraph< NodeIndexType, ArcIndexType >, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::IsArcValid ( ArcIndexType arc) const
inline

Definition at line 248 of file graph.h.

◆ operator[]()

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

Definition at line 1553 of file graph.h.

◆ OppositeArc()

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OppositeArc ( ArcIndexType arc) const

Definition at line 1580 of file graph.h.

◆ OppositeIncomingArcs()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OppositeIncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OppositeIncomingArcs ( NodeIndexType node) const
inline

Definition at line 942 of file graph.h.

◆ OppositeIncomingArcsStartingFrom()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OppositeIncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OppositeIncomingArcsStartingFrom ( NodeIndexType node,
ArcIndexType from ) const
inline

Definition at line 948 of file graph.h.

◆ OutDegree()

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutDegree ( NodeIndexType node) const

Definition at line 1564 of file graph.h.

◆ OutgoingArcs()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OutgoingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingArcs ( NodeIndexType node) const
inline

Definition at line 911 of file graph.h.

◆ OutgoingArcsStartingFrom()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OutgoingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingArcsStartingFrom ( NodeIndexType node,
ArcIndexType from ) const
inline

Definition at line 916 of file graph.h.

◆ OutgoingOrOppositeIncomingArcs()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OutgoingOrOppositeIncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingOrOppositeIncomingArcs ( NodeIndexType node) const

◆ OutgoingOrOppositeIncomingArcsStartingFrom()

template<typename NodeIndexType = int32_t, typename ArcIndexType = int32_t>
BeginEndWrapper< OutgoingOrOppositeIncomingArcIterator > util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::OutgoingOrOppositeIncomingArcsStartingFrom ( NodeIndexType node,
ArcIndexType from ) const

◆ ReserveArcs()

template<typename NodeIndexType, typename ArcIndexType>
void util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::ReserveArcs ( ArcIndexType bound)
override

Definition at line 1609 of file graph.h.

◆ ReserveNodes()

template<typename NodeIndexType, typename ArcIndexType>
void util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::ReserveNodes ( NodeIndexType bound)
override

Definition at line 1600 of file graph.h.

◆ Tail()

template<typename NodeIndexType, typename ArcIndexType>
NodeIndexType util::ReverseArcListGraph< NodeIndexType, ArcIndexType >::Tail ( ArcIndexType arc) const

Definition at line 1594 of file graph.h.


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