Input edges
ArrayList < Pair < Pair < Integer , Integer > , Float > > ed = new ArrayList < > ( Arrays . asList ( new Pair < Pair < Integer , Integer > , Float > ( new Pair < Integer , Integer > ( 1 , 2 ) , 0.5f ) , new Pair < Pair < Integer , Integer > , Float > ( new Pair < Integer , Integer > ( 1 , 3 ) , 1.9f ) , new Pair < Pair < Integer , Integer > , Float > ( new Pair < Integer , Integer > ( 2 , 3 ) , 3f ) ) ) ;