Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. public Graph<String,Integer> criar(List<String> list){
  2.     Graph<String,Integer> graph = new Graph<>(true);
  3.     for(String s1 : list){
  4.         for(String s2 : list){
  5.             if (!s1.equals(s2)){
  6.                 if(str_intersection(s1,s2) > 0){
  7.                     graph.insertEdge(s1,s2,str_intersection(s1, s2),(double) str_intersection(s1, s2));
  8.                 }
  9.             }
  10.         }
  11.     }
  12.     return graph;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement