<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This can be used to view a directed graph (that supports reverse arcs) from <aclass="el"href="graph_8h.html">graph.h</a> as un undirected graph: operator[](node) returns a pseudo-container that iterates over all nodes adjacent to "node" (from outgoing or incoming arcs). <ahref="classutil_1_1UndirectedAdjacencyListsOfDirectedGraph.html#details">More...</a><br/></td></tr>
<trclass="memdesc:namespaceutil"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. <br/></td></tr>
<trclass="memdesc:ac4af76993c891ee4ad507783edec2a1c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Here's a set of simple diagnosis tools. <ahref="namespaceutil.html#ac4af76993c891ee4ad507783edec2a1c">More...</a><br/></td></tr>
<trclass="memdesc:a0ed748741b17dad9e6cc485728bb0043"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a fresh copy of a given graph. <ahref="namespaceutil.html#a0ed748741b17dad9e6cc485728bb0043">More...</a><br/></td></tr>
<trclass="memitem:acfecdce43e9933bde2a94fd879f12f5f"><tdclass="memTemplItemLeft"align="right"valign="top">std::unique_ptr< Graph > </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#acfecdce43e9933bde2a94fd879f12f5f">util::RemapGraph</a> (const Graph &graph, const std::vector< int >&new_node_index)</td></tr>
<trclass="memdesc:acfecdce43e9933bde2a94fd879f12f5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a remapped copy of graph "graph", where node i becomes node new_node_index[i]. <ahref="namespaceutil.html#acfecdce43e9933bde2a94fd879f12f5f">More...</a><br/></td></tr>
<trclass="memitem:ad1df170a504d335462a1104a942e6069"><tdclass="memTemplItemLeft"align="right"valign="top">std::unique_ptr< Graph > </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#ad1df170a504d335462a1104a942e6069">util::GetSubgraphOfNodes</a> (const Graph &graph, const std::vector< int >&nodes)</td></tr>
<trclass="memdesc:ad1df170a504d335462a1104a942e6069"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the induced subgraph of "graph" restricted to the nodes in "nodes": the resulting graph will have exactly nodes.size() nodes, and its node #0 will be the former graph's node #nodes[0], etc. <ahref="namespaceutil.html#ad1df170a504d335462a1104a942e6069">More...</a><br/></td></tr>
<trclass="memitem:ab34783e729bb5fc99042893f6bfcbb2f"><tdclass="memTemplItemLeft"align="right"valign="top">std::vector< int > </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#ab34783e729bb5fc99042893f6bfcbb2f">util::GetWeaklyConnectedComponents</a> (const Graph &graph)</td></tr>
<trclass="memdesc:ab34783e729bb5fc99042893f6bfcbb2f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the weakly connected components of a directed graph that provides the OutgoingOrOppositeIncomingArcs() API, and returns them as a mapping from node to component index. <ahref="namespaceutil.html#ab34783e729bb5fc99042893f6bfcbb2f">More...</a><br/></td></tr>
<trclass="memitem:aa9fb4c9a176acaf72053b11727436e9e"><tdclass="memItemLeft"align="right"valign="top">bool </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#aa9fb4c9a176acaf72053b11727436e9e">util::IsSubsetOf0N</a> (const std::vector< int >&v, int n)</td></tr>
<trclass="memdesc:aa9fb4c9a176acaf72053b11727436e9e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns true iff the given vector is a subset of [0..n-1], i.e. <ahref="namespaceutil.html#aa9fb4c9a176acaf72053b11727436e9e">More...</a><br/></td></tr>
<trclass="memitem:ad7986b01cf61a31c09a27b4a97db6a83"><tdclass="memItemLeft"align="right"valign="top">bool </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#ad7986b01cf61a31c09a27b4a97db6a83">util::IsValidPermutation</a> (const std::vector< int >&v)</td></tr>
<trclass="memdesc:ad7986b01cf61a31c09a27b4a97db6a83"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns true iff the given vector is a permutation of [0..size()-1]. <ahref="namespaceutil.html#ad7986b01cf61a31c09a27b4a97db6a83">More...</a><br/></td></tr>
<trclass="memdesc:a8a06031908a024a50dbdddc394a22490"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a copy of "graph", without self-arcs and duplicate arcs. <ahref="namespaceutil.html#a8a06031908a024a50dbdddc394a22490">More...</a><br/></td></tr>
<trclass="memitem:a06fa201576c927d92657e090fa86bfdb"><tdclass="memTemplItemLeft"align="right"valign="top">void </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#a06fa201576c927d92657e090fa86bfdb">util::RemoveCyclesFromPath</a> (const Graph &graph, std::vector< int > *arc_path)</td></tr>
<trclass="memdesc:a06fa201576c927d92657e090fa86bfdb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Given an arc path, changes it to a sub-path with the same source and destination but without any cycle. <ahref="namespaceutil.html#a06fa201576c927d92657e090fa86bfdb">More...</a><br/></td></tr>
<trclass="memitem:adbb18bcb2f9d64cbbaeb57c328f57e7b"><tdclass="memTemplItemLeft"align="right"valign="top">bool </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#adbb18bcb2f9d64cbbaeb57c328f57e7b">util::PathHasCycle</a> (const Graph &graph, const std::vector< int >&arc_path)</td></tr>
<trclass="memdesc:adbb18bcb2f9d64cbbaeb57c328f57e7b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns true iff the given path contains a cycle. <ahref="namespaceutil.html#adbb18bcb2f9d64cbbaeb57c328f57e7b">More...</a><br/></td></tr>
<trclass="memitem:ae469c559688b92f36bae2788c2e6063e"><tdclass="memTemplItemLeft"align="right"valign="top">std::vector< int > </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespaceutil.html#ae469c559688b92f36bae2788c2e6063e">util::ComputeOnePossibleReverseArcMapping</a> (const Graph &graph, bool die_if_not_symmetric)</td></tr>
<trclass="memdesc:ae469c559688b92f36bae2788c2e6063e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a vector representing a mapping from arcs to arcs such that each arc is mapped to another arc with its (tail, head) flipped, if such an arc exists (otherwise it is mapped to -1). <ahref="namespaceutil.html#ae469c559688b92f36bae2788c2e6063e">More...</a><br/></td></tr>