Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class CLevelOfGraph<V,S>
- {
- public int iCalcLevelOfGraph(CGraph<V,S> pcGraph)
- {
- ArrayList<V> c_list_of_vertices = pcGraph.cGetVertices();
- int i_max_degree = 0;
- for (V v : c_list_of_vertices)
- {
- int i_act_degree = pcGraph.cGetEdges(v).size();
- if(i_act_degree > i_max_degree)
- i_max_degree = i_act_degree;
- } // for (V v : c_list_of_vertices)
- return i_max_degree;
- } // public int iCalcLevelOfGraph(CGraph<V,S>)
- } // public static class LevelOfGraph<V,S>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement