Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Graph<String,Integer> criar(List<String> list){
- Graph<String,Integer> graph = new Graph<>(true);
- for(String s1 : list){
- for(String s2 : list){
- if (!s1.equals(s2)){
- if(str_intersection(s1,s2) > 0){
- graph.insertEdge(s1,s2,str_intersection(s1, s2),(double) str_intersection(s1, s2));
- }
- }
- }
- }
- return graph;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement