Added getLink/getJunction index based functions to TreeGraph