[#BloombergLP-bslalg-RbTreeUtil_Validator]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::RbTreeUtil&lowbar;Validator
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for auxiliary functions used to validate a red&hyphen;black binary search tree&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;rbtreeutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct RbTreeUtil&lowbar;Validator;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/RbTreeUtil_Validator/isWellFormedAnchor.adoc[`isWellFormedAnchor`] 
| Return `true` if the specified `tree` is well&hyphen;formed, without confirming that it refers to a valid&hyphen;red&hyphen;black tree, and `false` otherwise&period; This method will return `true` if _all_ of the following are true&colon;
| xref:BloombergLP/bslalg/RbTreeUtil_Validator/validateRbTree.adoc[`validateRbTree`] 
| Return the (common) number of black nodes on each path from the specified `rootNode` to a leaf in the tree, 0 if `rootNode` is 0, and a negative number if `rootNode` does not refer to a valid red&hyphen;black binary search tree (ordered according to the specified `comparator`) that contains no nodes whose value is less than the specified `minNodeValue` (if not 0) or greater&hyphen;than the specified `maxNodeValue` (if not 0)&period; If `rootNode` does not refer to a valid red&hyphen;black tree containing nodes whose values are between the specified `minNodeValue` and `maxNodeValue` (inclusively) then load `errorNode` and `errorDescription` with the address of a node violating a red&hyphen;black tree constraint and a description of that violation, respectively&period; The behavior is undefined unless `rootNode` is 0, or refers to a valid binary tree&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
