Returns one more than the largest index of an extant direct
arc. To be used as a helper when clients need to dimension or
iterate over arrays of arc annotation information.
Returns one more than the largest index of an extant node,
meaning a node that is mentioned as the head or tail of some arc
in the graph. To be used as a helper when clients need to
dimension or iterate over arrays of node annotation information.
Utility function to check that a node index is within the bounds AND
different from kNilNode.
Returns true if node is in the range [kFirstNode .. max_num_nodes_).
It is exported so that users of the DerivedGraph class can use it.
To be used in a DCHECK; also used internally to validate
arguments passed to our methods from clients (e.g., AddArc()).
Returns one more than the largest valid index of a direct arc. To
be used as a helper when clients need to dimension or iterate
over arrays of arc annotation information.
Returns one more than the largest valid index of a node. To be
used as a helper when clients need to dimension or iterate over
arrays of node annotation information.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eStarGraphBase\u003c/code\u003e is a C++ class within the OR-Tools library providing a foundation for representing directed graphs.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods for accessing and managing nodes and arcs, including querying their properties and relationships.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes functions for retrieving graph size and validating node indices for operations.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eStarGraphBase\u003c/code\u003e as a base to build more specialized graph structures for their algorithms.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation describes various methods, such as \u003ccode\u003eHead\u003c/code\u003e, \u003ccode\u003eLookUpArc\u003c/code\u003e, and \u003ccode\u003eIsNodeValid\u003c/code\u003e, along with their parameters and return types.\u003c/p\u003e\n"]]],["The `StarGraphBase` class provides methods for managing graph structures. Key actions include retrieving the number of nodes and arcs (`num_nodes`, `num_arcs`), and obtaining index bounds (`end_node_index`, `end_arc_index`, `max_end_node_index`, `max_end_arc_index`). Methods also exist to check node validity (`IsNodeValid`), look up arcs (`LookUpArc`), and find an arc's head (`Head`). Debugging strings for nodes and arcs can also be generated (`NodeDebugString`, `ArcDebugString`). The maximum number of nodes and arcs are also accessible (`max_num_nodes`, `max_num_arcs`).\n"],null,["# StarGraphBase\n\nC++ Reference: class StarGraphBase\n==================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`ArcDebugString`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L311) | Return type: `std::string ` Arguments: `const ArcIndexType arc` \u003cbr /\u003e |\n| [`end_arc_index`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L253) | Return type: `ArcIndexType ` Returns one more than the largest index of an extant direct arc. To be used as a helper when clients need to dimension or iterate over arrays of arc annotation information. |\n| [`end_node_index`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L248) | Return type: `NodeIndexType ` Returns one more than the largest index of an extant node, meaning a node that is mentioned as the head or tail of some arc in the graph. To be used as a helper when clients need to dimension or iterate over arrays of node annotation information. |\n| [`Head`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L298) | Return type: `NodeIndexType ` Arguments: `const ArcIndexType arc` Returns the head or end-node of arc. |\n| [`IsNodeValid`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L280) | Return type: `bool ` Arguments: `NodeIndexType node` Utility function to check that a node index is within the bounds AND different from kNilNode. Returns true if node is in the range \\[kFirstNode .. max_num_nodes_). It is exported so that users of the DerivedGraph class can use it. To be used in a DCHECK; also used internally to validate arguments passed to our methods from clients (e.g., AddArc()). |\n| [`LookUpArc`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L286) | Return type: `ArcIndexType ` Arguments: `const NodeIndexType tail, const NodeIndexType head` Returns the first arc going from tail to head, if it exists, or kNilArc if such an arc does not exist. |\n| [`max_end_arc_index`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L272) | Return type: `ArcIndexType ` Returns one more than the largest valid index of a direct arc. To be used as a helper when clients need to dimension or iterate over arrays of arc annotation information. |\n| [`max_end_node_index`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L265) | Return type: `NodeIndexType ` Returns one more than the largest valid index of a node. To be used as a helper when clients need to dimension or iterate over arrays of node annotation information. |\n| [`max_num_arcs`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L260) | Return type: `ArcIndexType ` Returns the maximum possible number of original arcs in the graph. (The ones with positive indices.) |\n| [`max_num_nodes`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L256) | Return type: `NodeIndexType ` Returns the maximum possible number of nodes in the graph. |\n| [`NodeDebugString`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L303) | Return type: `std::string ` Arguments: `const NodeIndexType node` \u003cbr /\u003e |\n| [`num_arcs`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L242) | Return type: `ArcIndexType ` Returns the number of original arcs in the graph (The ones with positive indices.) |\n| [`num_nodes`](https://github.com/google/or-tools/blob/v9.4/ortools/graph/ebert_graph.h#L238) | Return type: `NodeIndexType ` Returns the number of nodes in the graph. |"]]