CycleBasis { public Collection essentialCycles() { Collection result = new HashSet(); for (Object subgraphBase : subgraphBases) { SimpleCycleBasis cycleBasis = (SimpleCycleBasis) subgraphBase; result.addAll(cycleBasis.essentialCycles()); } return result; } CycleBasis(UndirectedGraph g); int[] weightVector(); Collection cycles(); Collection essentialCycles(); Map relevantCycles(); List equivalenceClasses();  }
@Test public void testEssentialCycles() { Assert.assertEquals(4, basis.essentialCycles().size()); }