scala graph