#ifndef MY_GRAPH #define MY_GRAPH #include "my_structures.h" #include "my_util.h" #include "my_operator.h" // take an adjacency matrix and return a vector of verteces O(V ^^ 2) Graph mat2list(Matrix& adj_matrix); // from list of adjacency list to a adjecency matrix 0(V + E) Matrix list2mat(Graph& adj_list); // generate an oriented adj matrix Matrix generate_mat(float prob, int dim, bool oriented = true, int max_weight = 1); vector BFS(Graph& list, size_t src); vector BFS(Matrix& mat, int src); bool sametree(vector& dfs_vec, int start); void DFS_visit(Graph& G, vector& dfs_vec, vector>& stat, int& time, int index); vector DFS(Graph& G, int src = 0); vector DFS(Matrix& mat, int src = 0); #endif