Package instantbach.data

Examples of instantbach.data.Graph


     * @param file String
     * @return Graph
     * @throws BadRulesException
     */
    public Graph createProgressionGraph(String file) throws BadRulesException{
        Graph graph = new Graph();

        try {
            BufferedReader in = new BufferedReader(new FileReader(file));

            String line = "";
            while ((line = in.readLine()) != null) {
                StringTokenizer t = new StringTokenizer(line," ");
                graph.addEdge(t.nextToken(),t.nextToken(),1);
            }

            in.close();
        } catch (Exception io) {
            io.printStackTrace();
View Full Code Here

TOP

Related Classes of instantbach.data.Graph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.