Initialised class for dijikstra