/*!
* @fn weaklyConnectedComponents
*
* @headerfile <seqan/graph_algorithms.h>
*
* @brief Compute weakly connected components of a directed graph.
*
* @signature TSize weaklyConnectedComponents(g, components);
*
* @param[in] g A @link DirectedGraph @endlink to use for the input.
* @param[out] components A property map. Each vertex is mapped to a component
* id. If two vertices share the same id they are in the
* same component.
*
* @return TSize The number of weakly connected components (Metafunction: @link
* Graph#Size @endlink of the type of <tt>g</tt>).
*
* The running time is <tt>O(n a(n, n))</tt> where <tt>a</tt> is the inverse
* Ackermann function and thus almost linear. The union find data structure is
* used since the graph implementations do not allow the efficient iteration of
* in-edges.
*/