public void init() {

        graph = new WeightedNonDirectedGraphImpl<Integer>();
        Scanner scanner = new Scanner(getClass().getResourceAsStream("/dijkstraData.txt"));

        while (scanner.hasNextLine()) {
            String line = scanner.nextLine();
            String[] split = line.split("\t");

            Vertex<Integer> source = new Vertex<Integer>(Integer.valueOf(split[0]));
            graph.addVertex(source);
            for (int i = 1; i < split.length; i++) {
                String[] vertexWeight = split[i].split(",");

                Vertex<Integer> dest = new Vertex<Integer>(Integer.valueOf(vertexWeight[0]));

                graph.addVertex(dest);

                if (!graph.isEdge(source, dest)) {
                    graph.addEdge(source, dest, Integer.valueOf(vertexWeight[1]));
                }
            }

        }
    }