Return the in‐order predecessor of the specified node.
Synopsis
Declared in <bslalg_rbtreeutil.h>
static
RbTreeNode const*
previous(RbTreeNode const* node);
Description
Return the address of the node that precedes the specified node in an in‐order traversal of the binary tree to which node belongs, or the tree's rightmost node if node is the sentinel node of the tree. The behavior is undefined unless or node is a non‐leftmost member of a valid binary tree or is a sentinel node. Note that if the tree does not contain duplicate values, then the returned node will have the largest value less than that of node.
Return Value
address of the in‐order predecessor of node
Parameters
Name |
Description |
node |
node whose in‐order predecessor is returned |
Created with MrDocs