TranspositionTable { public int dagSize(SearchNode root) { final int result = markNodesReachableFrom(root); for (int i = 0; i < table.length; i++) { table[i].setMarked(false); } return result; } TranspositionTable(int megabytes, SearchNodeBuilder builder,
			CoordinateSystem coords); int dagSize(SearchNode root); synchronized SearchNode findIfPresent(long fancyHash);  }
@Test public void testDagSize() { SearchNode a = table.findOrAllocate(0L); SearchNode b = table.findOrAllocate(1L); SearchNode c = table.findOrAllocate(2L); SearchNode d = table.findOrAllocate(3L); SearchNode e = table.findOrAllocate(4L); table.addChild(a, b); table.addChild(b, c); table.addChild(b, d); table.addChild(c, e); table.addChild(d, e); assertEquals(5, table.dagSize(a)); assertEquals(4, table.dagSize(b)); assertEquals(2, table.dagSize(c)); assertEquals(2, table.dagSize(d)); assertEquals(1, table.dagSize(e)); }