Adjacency Matrix Lab

profileczreal
MatrixManipulation.txt

package adjacencymatrixdynamic; import java.util.ArrayList; import java.util.Collections; public class MatrixManipulation { public static ArrayList<ArrayList<Character> > PopulateGraph(ArrayList<ArrayList<Character> > graph, char vArray[], char eArray[]) { // add code to dynamicly populate graph here. return graph; } public static ArrayList<ArrayList<Character> > PopulateMatrix(ArrayList<ArrayList<Character> > matrix, char vArray[], char eArray[], ArrayList<ArrayList<Character> > graph) { // add code to populate matrix here. return matrix; } public static ArrayList<ArrayList<Character> > InitializeMatrix(int n, ArrayList<ArrayList<Character> > matrix) { for (int i = 0; i < n; i++) { ArrayList<Character> a1 = new ArrayList<>(); for (int j = 0; j < n; j++) { a1.add('0'); } matrix.add(a1); } return matrix; } }