C++ Reference: class BaseGraph

Note: This documentation is automatically generated.

Method
AllForwardArcs

Return type: IntegerRange<ArcIndex>

AllNodes

Return type: IntegerRange<NodeIndex>

Allows nice range-based for loop: for (const NodeIndex node : graph.AllNodes()) { ... } for (const ArcIndex arc : graph.AllForwardArcs()) { ... }

arc_capacity

Return type: ArcIndexType

Capacity reserved for future arcs, always >= num_arcs_.

BaseGraph

~BaseGraph

Return type: virtual

FreezeCapacities

Return type: void

FreezeCapacities() makes any future attempt to change the graph capacities crash in DEBUG mode.

GroupForwardArcsByFunctor

Return type: void

Arguments: const A& a, B* b

IsArcValid

Return type: bool

Arguments: ArcIndexType arc

Returns true if the given arc is a valid arc of the graph. Note that the arc validity range changes for graph with reverse arcs.

IsNodeValid

Return type: bool

Arguments: NodeIndexType node

Returns true if the given node is a valid node of the graph.

max_end_arc_index

Return type: ArcIndexType

node_capacity

Return type: NodeIndexType

Capacity reserved for future nodes, always >= num_nodes_.

num_arcs

Return type: ArcIndexType

Returns the number of valid arcs in the graph.

num_nodes

Return type: NodeIndexType

Returns the number of valid nodes in the graph.

Reserve

Return type: void

Arguments: NodeIndexType node_capacity, ArcIndexType arc_capacity

ReserveArcs

Return type: virtual void

Arguments: ArcIndexType bound

ReserveNodes

Return type: virtual void

Arguments: NodeIndexType bound

Changes the graph capacities. The functions will fail in debug mode if: - const_capacities_ is true. - A valid node does not fall into the new node range. - A valid arc does not fall into the new arc range. In non-debug mode, const_capacities_ is ignored and nothing will happen if the new capacity value for the arcs or the nodes is too small.