{"action":"created","comment":{"url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments/178529927","pull_request_review_id":108598595,"id":178529927,"diff_hunk":"@@ -0,0 +1,162 @@\n+/*\n+ * (C) Copyright 2018-2018, by Dimitrios Michail and Contributors.\n+ *\n+ * JGraphT : a free Java graph-theory library\n+ *\n+ * This program and the accompanying materials are dual-licensed under\n+ * either\n+ *\n+ * (a) the terms of the GNU Lesser General Public License version 2.1\n+ * as published by the Free Software Foundation, or (at your option) any\n+ * later version.\n+ *\n+ * or (per the licensee's choosing)\n+ *\n+ * (b) the terms of the Eclipse Public License v1.0 as published by\n+ * the Eclipse Foundation.\n+ */\n+package org.jgrapht.graph;\n+\n+import java.io.IOException;\n+import java.io.ObjectInputStream;\n+import java.io.ObjectOutputStream;\n+import java.io.Serializable;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import org.jgrapht.EdgeFactory;\n+import org.jgrapht.Graph;\n+import org.jgrapht.GraphType;\n+import org.jgrapht.util.TypeUtil;\n+\n+import com.google.common.graph.Graphs;\n+import com.google.common.graph.ImmutableNetwork;\n+import com.google.common.graph.NetworkBuilder;\n+\n+/**\n+ * A weighted graph adapter class using Guava's {@link ImmutableNetwork}.","path":"jgrapht-guava/src/main/java/org/jgrapht/graph/WeightedGraphImmutableNetworkAdapter.java","position":null,"original_position":37,"commit_id":"cebddde0ad62525d2e7fef0ddc15ee1fb24f23ed","original_commit_id":"bc289bf60172e10067df0c914b2dd9f63eea1e4d","user":{"login":"d-michail","id":15940875,"avatar_url":"https://avatars0.githubusercontent.com/u/15940875?v=4","gravatar_id":"","url":"https://api.github.com/users/d-michail","html_url":"https://github.com/d-michail","followers_url":"https://api.github.com/users/d-michail/followers","following_url":"https://api.github.com/users/d-michail/following{/other_user}","gists_url":"https://api.github.com/users/d-michail/gists{/gist_id}","starred_url":"https://api.github.com/users/d-michail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-michail/subscriptions","organizations_url":"https://api.github.com/users/d-michail/orgs","repos_url":"https://api.github.com/users/d-michail/repos","events_url":"https://api.github.com/users/d-michail/events{/privacy}","received_events_url":"https://api.github.com/users/d-michail/received_events","type":"User","site_admin":false},"body":"The `ValueGraph` does not have any class for the edges, the first generic parameter is the type of the vertices and the second generic parameter is the type of the weight of the edges. \r\n\r\nSince our weight is `double` and not a generic parameter, this forces us to map to a graph with a custom edge class which contains the weight as a field. Ideas?","created_at":"2018-04-02T11:43:01Z","updated_at":"2018-04-02T11:43:01Z","html_url":"https://github.com/jgrapht/jgrapht/pull/532#discussion_r178529927","pull_request_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments/178529927"},"html":{"href":"https://github.com/jgrapht/jgrapht/pull/532#discussion_r178529927"},"pull_request":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532"}},"in_reply_to_id":178483211},"pull_request":{"url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532","id":178680309,"html_url":"https://github.com/jgrapht/jgrapht/pull/532","diff_url":"https://github.com/jgrapht/jgrapht/pull/532.diff","patch_url":"https://github.com/jgrapht/jgrapht/pull/532.patch","issue_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/532","number":532,"state":"open","locked":false,"title":"Guava adapter","user":{"login":"d-michail","id":15940875,"avatar_url":"https://avatars0.githubusercontent.com/u/15940875?v=4","gravatar_id":"","url":"https://api.github.com/users/d-michail","html_url":"https://github.com/d-michail","followers_url":"https://api.github.com/users/d-michail/followers","following_url":"https://api.github.com/users/d-michail/following{/other_user}","gists_url":"https://api.github.com/users/d-michail/gists{/gist_id}","starred_url":"https://api.github.com/users/d-michail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-michail/subscriptions","organizations_url":"https://api.github.com/users/d-michail/orgs","repos_url":"https://api.github.com/users/d-michail/repos","events_url":"https://api.github.com/users/d-michail/events{/privacy}","received_events_url":"https://api.github.com/users/d-michail/received_events","type":"User","site_admin":false},"body":"A Guava adapter module which allows users to use all algorithms of the JGraphT library using the Guava 'Network` implementations. \r\n\r\nGuava contains 3 graph interfaces (a) Graph, (b) ValueGraph, and (c) Network. The `Network` class is the more general one and corresponds almost 1-to-1 with our `Graph` interface.\r\n\r\nKept on-purpose separate from the ext module since Guava is somewhat known for its incompatibilities between versions.\r\n\r\n","created_at":"2018-03-31T12:30:20Z","updated_at":"2018-04-02T11:43:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c9fd4d7bbbf1ab2ed35ded0612e338caa4a3dd7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jkinable","id":2742474,"avatar_url":"https://avatars1.githubusercontent.com/u/2742474?v=4","gravatar_id":"","url":"https://api.github.com/users/jkinable","html_url":"https://github.com/jkinable","followers_url":"https://api.github.com/users/jkinable/followers","following_url":"https://api.github.com/users/jkinable/following{/other_user}","gists_url":"https://api.github.com/users/jkinable/gists{/gist_id}","starred_url":"https://api.github.com/users/jkinable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkinable/subscriptions","organizations_url":"https://api.github.com/users/jkinable/orgs","repos_url":"https://api.github.com/users/jkinable/repos","events_url":"https://api.github.com/users/jkinable/events{/privacy}","received_events_url":"https://api.github.com/users/jkinable/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532/commits","review_comments_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532/comments","review_comment_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/532/comments","statuses_url":"https://api.github.com/repos/jgrapht/jgrapht/statuses/cebddde0ad62525d2e7fef0ddc15ee1fb24f23ed","head":{"label":"d-michail:guava-adapter","ref":"guava-adapter","sha":"cebddde0ad62525d2e7fef0ddc15ee1fb24f23ed","user":{"login":"d-michail","id":15940875,"avatar_url":"https://avatars0.githubusercontent.com/u/15940875?v=4","gravatar_id":"","url":"https://api.github.com/users/d-michail","html_url":"https://github.com/d-michail","followers_url":"https://api.github.com/users/d-michail/followers","following_url":"https://api.github.com/users/d-michail/following{/other_user}","gists_url":"https://api.github.com/users/d-michail/gists{/gist_id}","starred_url":"https://api.github.com/users/d-michail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-michail/subscriptions","organizations_url":"https://api.github.com/users/d-michail/orgs","repos_url":"https://api.github.com/users/d-michail/repos","events_url":"https://api.github.com/users/d-michail/events{/privacy}","received_events_url":"https://api.github.com/users/d-michail/received_events","type":"User","site_admin":false},"repo":{"id":63318196,"name":"jgrapht","full_name":"d-michail/jgrapht","owner":{"login":"d-michail","id":15940875,"avatar_url":"https://avatars0.githubusercontent.com/u/15940875?v=4","gravatar_id":"","url":"https://api.github.com/users/d-michail","html_url":"https://github.com/d-michail","followers_url":"https://api.github.com/users/d-michail/followers","following_url":"https://api.github.com/users/d-michail/following{/other_user}","gists_url":"https://api.github.com/users/d-michail/gists{/gist_id}","starred_url":"https://api.github.com/users/d-michail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-michail/subscriptions","organizations_url":"https://api.github.com/users/d-michail/orgs","repos_url":"https://api.github.com/users/d-michail/repos","events_url":"https://api.github.com/users/d-michail/events{/privacy}","received_events_url":"https://api.github.com/users/d-michail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/d-michail/jgrapht","description":"Master repository for the JGraphT project","fork":true,"url":"https://api.github.com/repos/d-michail/jgrapht","forks_url":"https://api.github.com/repos/d-michail/jgrapht/forks","keys_url":"https://api.github.com/repos/d-michail/jgrapht/keys{/key_id}","collaborators_url":"https://api.github.com/repos/d-michail/jgrapht/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/d-michail/jgrapht/teams","hooks_url":"https://api.github.com/repos/d-michail/jgrapht/hooks","issue_events_url":"https://api.github.com/repos/d-michail/jgrapht/issues/events{/number}","events_url":"https://api.github.com/repos/d-michail/jgrapht/events","assignees_url":"https://api.github.com/repos/d-michail/jgrapht/assignees{/user}","branches_url":"https://api.github.com/repos/d-michail/jgrapht/branches{/branch}","tags_url":"https://api.github.com/repos/d-michail/jgrapht/tags","blobs_url":"https://api.github.com/repos/d-michail/jgrapht/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/d-michail/jgrapht/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/d-michail/jgrapht/git/refs{/sha}","trees_url":"https://api.github.com/repos/d-michail/jgrapht/git/trees{/sha}","statuses_url":"https://api.github.com/repos/d-michail/jgrapht/statuses/{sha}","languages_url":"https://api.github.com/repos/d-michail/jgrapht/languages","stargazers_url":"https://api.github.com/repos/d-michail/jgrapht/stargazers","contributors_url":"https://api.github.com/repos/d-michail/jgrapht/contributors","subscribers_url":"https://api.github.com/repos/d-michail/jgrapht/subscribers","subscription_url":"https://api.github.com/repos/d-michail/jgrapht/subscription","commits_url":"https://api.github.com/repos/d-michail/jgrapht/commits{/sha}","git_commits_url":"https://api.github.com/repos/d-michail/jgrapht/git/commits{/sha}","comments_url":"https://api.github.com/repos/d-michail/jgrapht/comments{/number}","issue_comment_url":"https://api.github.com/repos/d-michail/jgrapht/issues/comments{/number}","contents_url":"https://api.github.com/repos/d-michail/jgrapht/contents/{+path}","compare_url":"https://api.github.com/repos/d-michail/jgrapht/compare/{base}...{head}","merges_url":"https://api.github.com/repos/d-michail/jgrapht/merges","archive_url":"https://api.github.com/repos/d-michail/jgrapht/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/d-michail/jgrapht/downloads","issues_url":"https://api.github.com/repos/d-michail/jgrapht/issues{/number}","pulls_url":"https://api.github.com/repos/d-michail/jgrapht/pulls{/number}","milestones_url":"https://api.github.com/repos/d-michail/jgrapht/milestones{/number}","notifications_url":"https://api.github.com/repos/d-michail/jgrapht/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/d-michail/jgrapht/labels{/name}","releases_url":"https://api.github.com/repos/d-michail/jgrapht/releases{/id}","deployments_url":"https://api.github.com/repos/d-michail/jgrapht/deployments","created_at":"2016-07-14T08:35:27Z","updated_at":"2018-03-31T10:01:14Z","pushed_at":"2018-04-02T11:33:39Z","git_url":"git://github.com/d-michail/jgrapht.git","ssh_url":"git@github.com:d-michail/jgrapht.git","clone_url":"https://github.com/d-michail/jgrapht.git","svn_url":"https://github.com/d-michail/jgrapht","homepage":"http://www.jgrapht.org","size":9060,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jgrapht:master","ref":"master","sha":"241bc19771ce2efee01111c27a6878b1c1c1576d","user":{"login":"jgrapht","id":1624681,"avatar_url":"https://avatars3.githubusercontent.com/u/1624681?v=4","gravatar_id":"","url":"https://api.github.com/users/jgrapht","html_url":"https://github.com/jgrapht","followers_url":"https://api.github.com/users/jgrapht/followers","following_url":"https://api.github.com/users/jgrapht/following{/other_user}","gists_url":"https://api.github.com/users/jgrapht/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrapht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrapht/subscriptions","organizations_url":"https://api.github.com/users/jgrapht/orgs","repos_url":"https://api.github.com/users/jgrapht/repos","events_url":"https://api.github.com/users/jgrapht/events{/privacy}","received_events_url":"https://api.github.com/users/jgrapht/received_events","type":"Organization","site_admin":false},"repo":{"id":3969325,"name":"jgrapht","full_name":"jgrapht/jgrapht","owner":{"login":"jgrapht","id":1624681,"avatar_url":"https://avatars3.githubusercontent.com/u/1624681?v=4","gravatar_id":"","url":"https://api.github.com/users/jgrapht","html_url":"https://github.com/jgrapht","followers_url":"https://api.github.com/users/jgrapht/followers","following_url":"https://api.github.com/users/jgrapht/following{/other_user}","gists_url":"https://api.github.com/users/jgrapht/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrapht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrapht/subscriptions","organizations_url":"https://api.github.com/users/jgrapht/orgs","repos_url":"https://api.github.com/users/jgrapht/repos","events_url":"https://api.github.com/users/jgrapht/events{/privacy}","received_events_url":"https://api.github.com/users/jgrapht/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jgrapht/jgrapht","description":"Master repository for the JGraphT project","fork":true,"url":"https://api.github.com/repos/jgrapht/jgrapht","forks_url":"https://api.github.com/repos/jgrapht/jgrapht/forks","keys_url":"https://api.github.com/repos/jgrapht/jgrapht/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgrapht/jgrapht/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgrapht/jgrapht/teams","hooks_url":"https://api.github.com/repos/jgrapht/jgrapht/hooks","issue_events_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/events{/number}","events_url":"https://api.github.com/repos/jgrapht/jgrapht/events","assignees_url":"https://api.github.com/repos/jgrapht/jgrapht/assignees{/user}","branches_url":"https://api.github.com/repos/jgrapht/jgrapht/branches{/branch}","tags_url":"https://api.github.com/repos/jgrapht/jgrapht/tags","blobs_url":"https://api.github.com/repos/jgrapht/jgrapht/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgrapht/jgrapht/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgrapht/jgrapht/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgrapht/jgrapht/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgrapht/jgrapht/statuses/{sha}","languages_url":"https://api.github.com/repos/jgrapht/jgrapht/languages","stargazers_url":"https://api.github.com/repos/jgrapht/jgrapht/stargazers","contributors_url":"https://api.github.com/repos/jgrapht/jgrapht/contributors","subscribers_url":"https://api.github.com/repos/jgrapht/jgrapht/subscribers","subscription_url":"https://api.github.com/repos/jgrapht/jgrapht/subscription","commits_url":"https://api.github.com/repos/jgrapht/jgrapht/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgrapht/jgrapht/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgrapht/jgrapht/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgrapht/jgrapht/contents/{+path}","compare_url":"https://api.github.com/repos/jgrapht/jgrapht/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgrapht/jgrapht/merges","archive_url":"https://api.github.com/repos/jgrapht/jgrapht/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgrapht/jgrapht/downloads","issues_url":"https://api.github.com/repos/jgrapht/jgrapht/issues{/number}","pulls_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls{/number}","milestones_url":"https://api.github.com/repos/jgrapht/jgrapht/milestones{/number}","notifications_url":"https://api.github.com/repos/jgrapht/jgrapht/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgrapht/jgrapht/labels{/name}","releases_url":"https://api.github.com/repos/jgrapht/jgrapht/releases{/id}","deployments_url":"https://api.github.com/repos/jgrapht/jgrapht/deployments","created_at":"2012-04-09T05:30:23Z","updated_at":"2018-04-02T04:42:14Z","pushed_at":"2018-04-02T11:33:41Z","git_url":"git://github.com/jgrapht/jgrapht.git","ssh_url":"git@github.com:jgrapht/jgrapht.git","clone_url":"https://github.com/jgrapht/jgrapht.git","svn_url":"https://github.com/jgrapht/jgrapht","homepage":"http://www.jgrapht.org","size":9026,"stargazers_count":1120,"watchers_count":1120,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":450,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":450,"open_issues":46,"watchers":1120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532"},"html":{"href":"https://github.com/jgrapht/jgrapht/pull/532"},"issue":{"href":"https://api.github.com/repos/jgrapht/jgrapht/issues/532"},"comments":{"href":"https://api.github.com/repos/jgrapht/jgrapht/issues/532/comments"},"review_comments":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532/comments"},"review_comment":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/532/commits"},"statuses":{"href":"https://api.github.com/repos/jgrapht/jgrapht/statuses/cebddde0ad62525d2e7fef0ddc15ee1fb24f23ed"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"d-michail"}}