let weaklycomponents graph = 
    let module C = Components.Make(UndG) in
    C.scc_array (undirect graph)