private void Transform(string input, string expected) { Graph g = Parser.Parse(input); ImplicitToExplicit ite = new ImplicitToExplicit(); ToSubsetAtoms tsa = new ToSubsetAtoms(); ExplicitToImplicit eti = new ExplicitToImplicit(); string actual = Generator.Generate(eti.Apply( tsa.Apply( ite.Apply(g)))); Assert.AreEqual(expected, actual); }
private static IAtom ReducedAtom(Graph g, int u) { var a = g.GetAtom(u); int sum = 0; foreach (var e in g.GetEdges(u)) { sum += e.Bond.Order; } return(ToSubsetAtoms.ToSubset(g.GetAtom(u), g, u)); }