public static CustomGraph createGraph(String path) { if (getLessons().Count == 0) InitializeLessons(); CustomGraph graph = new CustomGraph(path, "SIMPLE"); //CustomGraph graph = new CustomGraph(@"..\..\Resources\assests\Matrices.txt", "SIMPLE"); //CustomGraph graph = new CustomGraph(@"Resources\assests\Matrices.txt", "SIMPLE"); return graph; }
public static CustomGraph createGraph(String path) { if (getLessons().Count == 0) { InitializeLessons(); } CustomGraph graph = new CustomGraph(path, "SIMPLE"); //CustomGraph graph = new CustomGraph(@"..\..\Resources\assests\Matrices.txt", "SIMPLE"); //CustomGraph graph = new CustomGraph(@"Resources\assests\Matrices.txt", "SIMPLE"); return(graph); }
public static List <int> getPreReqsForLesson(int lesson_id) { List <int> adj_ids = new List <int>(); CustomGraph g = new CustomGraph(@"..\..\Resources\assests\Matrices.txt", "SIMPLE"); // CustomGraph g = Controller.GetLessonGraphs().ElementAt(0); // Console.WriteLine("tOTAL gRAPHS :"+Controller.GetLessonGraphs().Count); for (int i = 0; i < g.NumberNodes; i++) { if (g.AreAdjacent(lesson_id, i)) { adj_ids.Add(i); LessonPreReq pre = getPreReq(i); if (pre != null) { getLesson(lesson_id).PreReqs.Add((pre)); } //Console.WriteLine("Oh Yes ADDED"); } } //MessageBox.Show(adj_ids.Count + ""); return(adj_ids); }
public static List<int> getPreReqsForLesson(int lesson_id) { List<int> adj_ids = new List<int>(); CustomGraph g = new CustomGraph(@"..\..\Resources\assests\Matrices.txt", "SIMPLE"); // CustomGraph g = Controller.GetLessonGraphs().ElementAt(0); // Console.WriteLine("tOTAL gRAPHS :"+Controller.GetLessonGraphs().Count); for (int i = 0; i < g.NumberNodes; i++) { if (g.AreAdjacent(lesson_id, i)) { adj_ids.Add(i); LessonPreReq pre = getPreReq(i); if (pre != null) getLesson(lesson_id).PreReqs.Add((pre)); //Console.WriteLine("Oh Yes ADDED"); } } //MessageBox.Show(adj_ids.Count + ""); return adj_ids; }