BloombergLP::bslalg::RbTreeUtil::validateRbTree

validateRbTree overloads

Synopses

Declared in <bslalg_rbtreeutil.h>

Return the black-node depth of a valid red-black tree.

template<class NODE_COMPARATOR>
static
int
validateRbTree(
    RbTreeNode const* rootNode,
    NODE_COMPARATOR const& comparator);
» more...

Return black-node depth, loading violation details if invalid.

template<class NODE_COMPARATOR>
static
int
validateRbTree(
    RbTreeNode const** errorNode,
    char const** errorDescription,
    RbTreeNode const* rootNode,
    NODE_COMPARATOR const& comparator);
» more...

Return Value

black-node depth, 0 if rootNode is 0, or a negative number if invalid

Parameters

NameDescription
rootNoderoot of the tree to validate, or 0
comparatorfunctor used to order nodes in the tree
errorNodeset to a node that violates a red-black constraint
errorDescriptionset to a description of the violation