[#BloombergLP-bdlb-TopologicalSortUtil_Helper]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::TopologicalSortUtil&lowbar;Helper
:relfileprefix: ../../
:mrdocs:

Helper that builds work&hyphen;set data for a topological sort&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;topologicalsortutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
class TopologicalSortUtil&lowbar;Helper;
----

== Description

This class template provides data structures required to sort the partial unsorted edges into a total ordered set of nodes&period; The value type of the nodes(&ast;) must be hashable and equality comparable by `bsl&colon;&colon;hash`, and `bsl&colon;&colon;equal&lowbar;to` respectively&period;

&ast; (&ast;) The value type is determined by first getting the iterator&apos;s value type using `bsl&colon;&colon;iterator&lowbar;traits&lt;INPUT&lowbar;ITER&gt;&colon;&colon;ValueType` and then using `TopologicalSortUtilEdgeTraits&colon;&colon;ValueType` on that result&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/TopologicalSortUtil_Helper/2constructor.adoc[`TopologicalSortUtil&lowbar;Helper`]         [.small]#[constructor]#
| Create a helper for topological sorting of the given relations&period;
| xref:BloombergLP/bdlb/TopologicalSortUtil_Helper/processNextNodeInOrder.adoc[`processNextNodeInOrder`] 
| Write the next ready node to an output iterator&period;
| xref:BloombergLP/bdlb/TopologicalSortUtil_Helper/sortImpl.adoc[`sortImpl`] 
| Sort constructed inputs into topological order&period;
| xref:BloombergLP/bdlb/TopologicalSortUtil_Helper/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;TopologicalSortUtil&lowbar;Helper, UsesBslmaAllocator&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===



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