InterLayerPropagationGraph { public SortedSet<Link> getLinksInGraph () { return interLayerPropagationGraph.vertexSet().stream().filter(e->e.isLink()).map(e->e.getLink()).collect(Collectors.toCollection(TreeSet::new)); } InterLayerPropagationGraph(SortedSet<Demand> initialDemands , SortedSet<Link> initialLinks ,
			SortedSet<Pair<MulticastDemand,Node>> initialMDemands , boolean upWards); SortedSet<IPGNode> getInitialIPGVertices(); SortedMap<Demand, IPGNode> getDemand2IGPVertexMap(); SortedMap<Link, IPGNode> getLink2IGPVertexMap(); SortedMap<Pair<MulticastDemand, Node>, IPGNode> getmDemandAndNode2VertexMap(); boolean isUpWardsTrueDownwardsFalse(); DirectedAcyclicGraph<IPGNode, Object> getInterLayerPropagationGraph(); SortedSet<Link> getLinksInGraph(); SortedSet<Demand> getDemandsInGraph(); SortedSet<Pair<MulticastDemand,Node>> getMulticastDemandFlowsInGraph();  }
@Test public void testGetLinksInGraph() { assertEquals(g_demand23_L2_up.getLinksInGraph() , new TreeSet<> (Arrays.asList())); assertEquals(g_demand23_L2_down.getLinksInGraph() , new TreeSet<> (Arrays.asList(link23_L2_cL0 , link23_L0))); assertEquals(g_mDemand123_L2_N1_up.getLinksInGraph() , new TreeSet<> (Arrays.asList())); assertEquals(g_mDemand123_L2_N1_down.getLinksInGraph() , new TreeSet<> (Arrays.asList(link12_L2_cML1 , link12_L1_cL0 , link12_L0))); assertEquals(g_link12_L0_up.getLinksInGraph() , new TreeSet<> (Arrays.asList(link12_L0 , link12_L1_cL0, link12_L2_cML1))); assertEquals(g_link12_L0_down.getLinksInGraph() , new TreeSet<> (Arrays.asList(link12_L0))); assertEquals(g_link13_L0_down.getLinksInGraph() , new TreeSet<> (Arrays.asList(link13_L0))); assertEquals(g_link13_L0_up.getLinksInGraph() , new TreeSet<> (Arrays.asList(link13_L0 , link13_L1_cL0, link13_L2_cL1 , link13_L2_cML1))); }