Gossip and Push-Sum algorithm in Scala