Functions { public static Graph reverse(Graph g) { return g.permute(reverse(g.order())); } private  Functions(); static Graph randomise(Graph g); static Graph reverse(Graph g); static Graph atomBasedDBStereo(Graph g); static Graph bondBasedDBStereo(Graph g); static Graph expand(Graph g); static Graph collapse(Graph g); static Graph normaliseDirectionalLabels(Graph g); static Graph canonicalize(final Graph g,
                                     final long[] labels); static Graph renumberAtomMaps(final Graph g);  }
@Test public void reverse_ethanol() throws Exception { Graph g = Graph.fromSmiles("CCO"); assertThat(Functions.reverse(g).toSmiles(), is("OCC")); }
@Test public void reverse_withBranch() throws Exception { Graph g = Graph.fromSmiles("CC(CC(CO)C)CCO"); assertThat(Functions.reverse(g).toSmiles(), is("OCCC(CC(C)CO)C")); }