{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/graph/pulls/comments/42574381","id":42574381,"diff_hunk":"@@ -65,67 +109,96 @@ func (g *DirectedDenseGraph) Edges() []graph.Edge {\n \t\t\t\tcontinue\n \t\t\t}\n \t\t\tif w := g.mat.At(i, j); !isSame(w, g.absent) {\n-\t\t\t\tedges = append(edges, Edge{F: Node(i), T: Node(j), W: w})\n+\t\t\t\tedges = append(edges, Edge{F: g.Node(i), T: g.Node(j), W: w})\n \t\t\t}\n \t\t}\n \t}\n \treturn edges\n }\n \n-func (g *DirectedDenseGraph) From(n graph.Node) []graph.Node {\n-\tvar neighbors []graph.Node\n+// From returns all nodes in g that can be reached directly from n.\n+func (g *DirectedMatrix) From(n graph.Node) []graph.Node {\n \tid := n.ID()\n+\tif !g.has(id) {\n+\t\treturn nil\n+\t}\n+\tvar neighbors []graph.Node\n \t_, c := g.mat.Dims()\n \tfor j := 0; j < c; j++ {\n \t\tif j == id {\n \t\t\tcontinue\n \t\t}\n \t\tif !isSame(g.mat.At(id, j), g.absent) {\n-\t\t\tneighbors = append(neighbors, Node(j))\n+\t\t\tneighbors = append(neighbors, g.Node(j))\n \t\t}\n \t}\n \treturn neighbors\n }\n \n-func (g *DirectedDenseGraph) To(n graph.Node) []graph.Node {\n-\tvar neighbors []graph.Node\n+// To returns all nodes in g that can reach directly to n.\n+func (g *DirectedMatrix) To(n graph.Node) []graph.Node {\n \tid := n.ID()\n+\tif !g.has(id) {\n+\t\treturn nil\n+\t}\n+\tvar neighbors []graph.Node\n \tr, _ := g.mat.Dims()\n \tfor i := 0; i < r; i++ {\n \t\tif i == id {\n \t\t\tcontinue\n \t\t}\n \t\tif !isSame(g.mat.At(i, id), g.absent) {\n-\t\t\tneighbors = append(neighbors, Node(i))\n+\t\t\tneighbors = append(neighbors, g.Node(i))\n \t\t}\n \t}\n \treturn neighbors\n }\n \n-func (g *DirectedDenseGraph) HasEdgeBetween(x, y graph.Node) bool {\n+// HasEdgeBeteen returns whether an edge exists between nodes x and y without","path":"simple/dense_directed_matrix.go","position":179,"original_position":179,"commit_id":"33f8acf8a6bf69cf15bb2139c5376ca90f73fc95","original_commit_id":"33f8acf8a6bf69cf15bb2139c5376ca90f73fc95","user":{"login":"vladimir-ch","id":1837502,"avatar_url":"https://avatars.githubusercontent.com/u/1837502?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-ch","html_url":"https://github.com/vladimir-ch","followers_url":"https://api.github.com/users/vladimir-ch/followers","following_url":"https://api.github.com/users/vladimir-ch/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-ch/subscriptions","organizations_url":"https://api.github.com/users/vladimir-ch/orgs","repos_url":"https://api.github.com/users/vladimir-ch/repos","events_url":"https://api.github.com/users/vladimir-ch/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-ch/received_events","type":"User","site_admin":false},"body":"Sorry, missed this one `HasEdgeBetween`.","created_at":"2015-10-21T01:15:47Z","updated_at":"2015-10-21T01:15:47Z","html_url":"https://github.com/gonum/graph/pull/132#discussion_r42574381","pull_request_url":"https://api.github.com/repos/gonum/graph/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/gonum/graph/pulls/comments/42574381"},"html":{"href":"https://github.com/gonum/graph/pull/132#discussion_r42574381"},"pull_request":{"href":"https://api.github.com/repos/gonum/graph/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/graph/pulls/132","id":47860206,"html_url":"https://github.com/gonum/graph/pull/132","diff_url":"https://github.com/gonum/graph/pull/132.diff","patch_url":"https://github.com/gonum/graph/pull/132.patch","issue_url":"https://api.github.com/repos/gonum/graph/issues/132","number":132,"state":"open","locked":false,"title":"simple: cleanup docs and definitions","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"This also adds the possibility of storing nodes in adjacency matrix graphs - though not edges.\r\n\r\n@vladimir-ch Please take a look.\r\n","created_at":"2015-10-16T00:51:33Z","updated_at":"2015-10-21T01:15:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8753f233739ed3441b5a61553ae9d321a8897b6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/graph/pulls/132/commits","review_comments_url":"https://api.github.com/repos/gonum/graph/pulls/132/comments","review_comment_url":"https://api.github.com/repos/gonum/graph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/graph/issues/132/comments","statuses_url":"https://api.github.com/repos/gonum/graph/statuses/33f8acf8a6bf69cf15bb2139c5376ca90f73fc95","head":{"label":"gonum:simple-cleanup","ref":"simple-cleanup","sha":"33f8acf8a6bf69cf15bb2139c5376ca90f73fc95","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":8589420,"name":"graph","full_name":"gonum/graph","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/graph","description":"Graph packages for the Go language","fork":false,"url":"https://api.github.com/repos/gonum/graph","forks_url":"https://api.github.com/repos/gonum/graph/forks","keys_url":"https://api.github.com/repos/gonum/graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/graph/teams","hooks_url":"https://api.github.com/repos/gonum/graph/hooks","issue_events_url":"https://api.github.com/repos/gonum/graph/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/graph/events","assignees_url":"https://api.github.com/repos/gonum/graph/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/graph/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/graph/tags","blobs_url":"https://api.github.com/repos/gonum/graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/graph/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/graph/languages","stargazers_url":"https://api.github.com/repos/gonum/graph/stargazers","contributors_url":"https://api.github.com/repos/gonum/graph/contributors","subscribers_url":"https://api.github.com/repos/gonum/graph/subscribers","subscription_url":"https://api.github.com/repos/gonum/graph/subscription","commits_url":"https://api.github.com/repos/gonum/graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/graph/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/graph/merges","archive_url":"https://api.github.com/repos/gonum/graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/graph/downloads","issues_url":"https://api.github.com/repos/gonum/graph/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/graph/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/graph/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/graph/labels{/name}","releases_url":"https://api.github.com/repos/gonum/graph/releases{/id}","created_at":"2013-03-05T21:22:45Z","updated_at":"2015-10-20T16:19:14Z","pushed_at":"2015-10-21T00:47:45Z","git_url":"git://github.com/gonum/graph.git","ssh_url":"git@github.com:gonum/graph.git","clone_url":"https://github.com/gonum/graph.git","svn_url":"https://github.com/gonum/graph","homepage":"","size":3603,"stargazers_count":89,"watchers_count":89,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":16,"forks":13,"open_issues":16,"watchers":89,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"ea73c0e6ae4aa63b09ae3b26900fc96ebd535c68","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":8589420,"name":"graph","full_name":"gonum/graph","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/graph","description":"Graph packages for the Go language","fork":false,"url":"https://api.github.com/repos/gonum/graph","forks_url":"https://api.github.com/repos/gonum/graph/forks","keys_url":"https://api.github.com/repos/gonum/graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/graph/teams","hooks_url":"https://api.github.com/repos/gonum/graph/hooks","issue_events_url":"https://api.github.com/repos/gonum/graph/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/graph/events","assignees_url":"https://api.github.com/repos/gonum/graph/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/graph/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/graph/tags","blobs_url":"https://api.github.com/repos/gonum/graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/graph/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/graph/languages","stargazers_url":"https://api.github.com/repos/gonum/graph/stargazers","contributors_url":"https://api.github.com/repos/gonum/graph/contributors","subscribers_url":"https://api.github.com/repos/gonum/graph/subscribers","subscription_url":"https://api.github.com/repos/gonum/graph/subscription","commits_url":"https://api.github.com/repos/gonum/graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/graph/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/graph/merges","archive_url":"https://api.github.com/repos/gonum/graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/graph/downloads","issues_url":"https://api.github.com/repos/gonum/graph/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/graph/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/graph/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/graph/labels{/name}","releases_url":"https://api.github.com/repos/gonum/graph/releases{/id}","created_at":"2013-03-05T21:22:45Z","updated_at":"2015-10-20T16:19:14Z","pushed_at":"2015-10-21T00:47:45Z","git_url":"git://github.com/gonum/graph.git","ssh_url":"git@github.com:gonum/graph.git","clone_url":"https://github.com/gonum/graph.git","svn_url":"https://github.com/gonum/graph","homepage":"","size":3603,"stargazers_count":89,"watchers_count":89,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":16,"forks":13,"open_issues":16,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/graph/pulls/132"},"html":{"href":"https://github.com/gonum/graph/pull/132"},"issue":{"href":"https://api.github.com/repos/gonum/graph/issues/132"},"comments":{"href":"https://api.github.com/repos/gonum/graph/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/graph/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/graph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/graph/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/graph/statuses/33f8acf8a6bf69cf15bb2139c5376ca90f73fc95"}}}}