Package instantbach.data.graph

Examples of instantbach.data.graph.Vertex


        //add the dominant as the second to last
        identifiers.add("7V");

        //get the current vertex (for the cadence)
        Vertex currentVertex = graph.getVertex("7V");

        for (int i = 0; i < 9; i++) {

            //get the adjacent edges to the current vertex
            LinkedList<Edge> currentEdges = currentVertex.getAdjacent();
            int numToChoose = currentEdges.size();

            int randomNumber = (int) (Math.random() * numToChoose + 0);

            //get a random edge
            Edge randomEdge = currentEdges.get(randomNumber);

            //get the destination of the random edge
            currentVertex = randomEdge.getDestination();

            String identifier = currentVertex.getName();
            identifiers.add(identifier);
            //returnVector.add(current.name);
        }

        //create a progression using the given identifiers
View Full Code Here

TOP

Related Classes of instantbach.data.graph.Vertex

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.