Find the densest subgraph in an undirected graph through Andrew Goldberg's algorithm.
- Compute the densest subgraph given a graph in edge-list format.
- The edge list format needs to be symmetric, so if (ei[k1],ej[k1]) = (r,s) then there must be (ei[k2],ej[k2]) = (s,r),
- unless r==s.
- @param [in] n the number of nodes of the graph
- @param [in] m the number of edges of the graph (and also the length of arrays ei, ej, w)
- @param [in] ei a list of sources for each edge (0 <= ei[i] <= n-1) of length m
- @param [in] ej a list of destinations for each edge (0 <= ei[i] <= n-1) of length m
- @param [in] w a list of non-negative weights for each edge (0 <= w[i]) of length m
- @param [out] output a list of vertices in the densest subgraph used, 0 <= output[i] <= n-1 for 0 <= i <= outputlen-1, this array must be capable of holding n
- @param [in/out] the valid length of the output list and the length of the set of output used.
- @return the density of the densest subgraph in total_edge_weight/number of vertices