Google OR-Tools: util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>
class util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >

Definition at line 206 of file graph.h.

#include <graph.h>

util::ReverseArcStaticGraph< NodeIndex, ArcIndex >

Public Types

typedef NodeIndexType NodeIndex
typedef ArcIndexType ArcIndex

Public Member Functions

 BaseGraph ()
 BaseGraph (const BaseGraph &)=default
BaseGraphoperator= (const BaseGraph &)=default
virtual ~BaseGraph ()=default
NodeIndexType num_nodes () const
NodeIndexType size () 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 ()
virtual void Build (std::vector< ArcIndexType > *permutation)
void Build ()
virtual bool IsBuilt () const

Static Public Attributes

static constexpr bool kHasNegativeReverseArcs = HasNegativeReverseArcs
static constexpr NodeIndexType kNilNode
static constexpr ArcIndexType kNilArc

Protected Attributes

NodeIndexType num_nodes_
NodeIndexType node_capacity_
ArcIndexType num_arcs_
ArcIndexType arc_capacity_
bool const_capacities_

◆ ArcIndex

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

typedef ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::ArcIndex

◆ NodeIndex

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

typedef NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::NodeIndex

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::BaseGraph ( )
inline

◆ BaseGraph() [2/2]

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::BaseGraph ( const BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs > & )
default

◆ ~BaseGraph()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

virtual util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::~BaseGraph ( )
virtualdefault

◆ AllForwardArcs()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

IntegerRange< ArcIndexType > util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::AllForwardArcs ( ) const

◆ AllNodes()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

IntegerRange< NodeIndexType > util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::AllNodes ( ) const

◆ arc_capacity()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::arc_capacity ( ) const

◆ Build() [1/2]

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::Build ( )
inline

◆ Build() [2/2]

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

virtual void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::Build ( std::vector< ArcIndexType > * permutation)
inlinevirtual

◆ BuildStartAndForwardHead()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::BuildStartAndForwardHead ( internal::SVector< ArcIndexType, NodeIndexType > * head,
internal::Vector< NodeIndexType, ArcIndexType > * start,
std::vector< ArcIndexType > * permutation )
protected

◆ ComputeCumulativeSum()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::ComputeCumulativeSum ( internal::Vector< NodeIndexType, ArcIndexType > * v)
protected

◆ FreezeCapacities()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::FreezeCapacities ( )

◆ IsArcValid()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

bool util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::IsArcValid ( ArcIndexType arc) const
inline

◆ IsBuilt()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

virtual bool util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::IsBuilt ( ) const
inlinevirtual

◆ IsNodeValid()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

bool util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::IsNodeValid ( NodeIndexType node) const
inline

◆ node_capacity()

template<typename Impl, typename NodeIndexType, typename ArcIndexType, bool HasNegativeReverseArcs>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::node_capacity ( ) const

◆ num_arcs()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::num_arcs ( ) const
inline

◆ num_nodes()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::num_nodes ( ) const
inline

◆ operator=()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

BaseGraph & util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::operator= ( const BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs > & )
default

◆ Reserve()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::Reserve ( NodeIndexType node_capacity,
ArcIndexType arc_capacity )
inline

◆ ReserveArcs()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

virtual void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::ReserveArcs ( ArcIndexType bound)
inlinevirtual

◆ ReserveNodes()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

virtual void util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::ReserveNodes ( NodeIndexType bound)
inlinevirtual

◆ size()

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::size ( ) const
inline

◆ arc_capacity_

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::arc_capacity_

protected

◆ const_capacities_

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

bool util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::const_capacities_

protected

◆ kHasNegativeReverseArcs

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

bool util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::kHasNegativeReverseArcs = HasNegativeReverseArcs

staticconstexpr

◆ kNilArc

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::kNilArc

staticconstexpr

Initial value:

=

std::numeric_limits<ArcIndexType>::max()

Definition at line 292 of file graph.h.

◆ kNilNode

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::kNilNode

staticconstexpr

Initial value:

=

std::numeric_limits<NodeIndexType>::max()

Definition at line 289 of file graph.h.

◆ node_capacity_

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::node_capacity_

protected

◆ num_arcs_

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

ArcIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::num_arcs_

protected

◆ num_nodes_

template<typename Impl, typename NodeIndexType = int32_t, typename ArcIndexType = int32_t, bool HasNegativeReverseArcs = false>

NodeIndexType util::BaseGraph< Impl, NodeIndexType, ArcIndexType, HasNegativeReverseArcs >::num_nodes_

protected

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