public Graph(String fileName) {
        File f = new File(fileName);

        try {
            HashMap<Integer, Node> map = new HashMap<Integer, Node>();
            HashMap<Integer, Node> reverseMap = new HashMap<Integer, Node>();

            Scanner s = new Scanner(f);

            int curLine = 0;
            while (s.hasNext()) {
                String[] edge = s.nextLine().split(" ");
                int start = Integer.valueOf(edge[0]);
                int end = Integer.valueOf(edge[1]);

                // Find the node for start and end
                Node startNode, endNode;
                if (!map.containsKey(start))
                    map.put(start, new Node(start));
                startNode = map.get(start);

                if (!map.containsKey(end))
                    map.put(end, new Node(end));
                endNode = map.get(end);

                startNode.out.add(endNode);

                // Reverse map
                Node rStartNode, rEndNode;
                if (!reverseMap.containsKey(start))
                    reverseMap.put(start, new Node(start));
                rStartNode = reverseMap.get(start);

                if (!reverseMap.containsKey(end))
                    reverseMap.put(end, new Node(end));
                rEndNode = reverseMap.get(end);

                rEndNode.out.add(rStartNode);


                System.out.println("Line: " + curLine);
                curLine++;
            }

            this.map = map;
            vertices = (Collection<Node>) map.values();
            reverseGraph = (Collection<Node>) reverseMap.values();

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }