{"action":"created","comment":{"url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments/170453351","pull_request_review_id":99143325,"id":170453351,"diff_hunk":"@@ -479,6 +479,32 @@\n         return new HierholzerEulerianCycle<V, E>().isEulerian(graph);\n     }\n \n+    /**\n+     * Tests whether a graph meets Ore's condition to be Hamiltonian.\n+     *\n+     * Let G be a (finite and simple) graph with n ≥ 3 vertices. We denote by deg v the degree of a vertex v in G, i.e. the number of incident edges in G to v.\n+     * Then, Ore's theorem states that if deg v + deg w ≥ n for every pair of distinct non-adjacent vertices v and w of G, then G is Hamiltonian.\n+     *\n+     * @param graph the input graph\n+     * @param <V> the graph vertex type\n+     * @param <E> the graph edge type\n+     * @return true if the graph meets Ore's condition, false otherwise\n+     * @see org.jgrapht.alg.tour.PalmerHamiltonianCycle\n+     */\n+    public static <V, E> boolean hasOreProperty(Graph<V, E> graph){","path":"jgrapht-core/src/main/java/org/jgrapht/GraphTests.java","position":34,"original_position":34,"commit_id":"e6685148613f157a206199e52e75798ad6fc4667","original_commit_id":"6517c016fa0d93354718b4f997a33821e61c0752","user":{"login":"AlexandruValeanu","id":7942531,"avatar_url":"https://avatars2.githubusercontent.com/u/7942531?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandruValeanu","html_url":"https://github.com/AlexandruValeanu","followers_url":"https://api.github.com/users/AlexandruValeanu/followers","following_url":"https://api.github.com/users/AlexandruValeanu/following{/other_user}","gists_url":"https://api.github.com/users/AlexandruValeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandruValeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandruValeanu/subscriptions","organizations_url":"https://api.github.com/users/AlexandruValeanu/orgs","repos_url":"https://api.github.com/users/AlexandruValeanu/repos","events_url":"https://api.github.com/users/AlexandruValeanu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandruValeanu/received_events","type":"User","site_admin":false},"body":"I have added it but I still don't understand something: isn't some checking of undirected-ness also done in `isSimple`?","created_at":"2018-02-25T13:38:35Z","updated_at":"2018-02-25T13:38:36Z","html_url":"https://github.com/jgrapht/jgrapht/pull/496#discussion_r170453351","pull_request_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments/170453351"},"html":{"href":"https://github.com/jgrapht/jgrapht/pull/496#discussion_r170453351"},"pull_request":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496"}},"in_reply_to_id":170450877},"pull_request":{"url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496","id":171147513,"html_url":"https://github.com/jgrapht/jgrapht/pull/496","diff_url":"https://github.com/jgrapht/jgrapht/pull/496.diff","patch_url":"https://github.com/jgrapht/jgrapht/pull/496.patch","issue_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/496","number":496,"state":"closed","locked":false,"title":"(Old) Palmer's algorithm for graphs that meet Ore's condition","user":{"login":"AlexandruValeanu","id":7942531,"avatar_url":"https://avatars2.githubusercontent.com/u/7942531?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandruValeanu","html_url":"https://github.com/AlexandruValeanu","followers_url":"https://api.github.com/users/AlexandruValeanu/followers","following_url":"https://api.github.com/users/AlexandruValeanu/following{/other_user}","gists_url":"https://api.github.com/users/AlexandruValeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandruValeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandruValeanu/subscriptions","organizations_url":"https://api.github.com/users/AlexandruValeanu/orgs","repos_url":"https://api.github.com/users/AlexandruValeanu/repos","events_url":"https://api.github.com/users/AlexandruValeanu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandruValeanu/received_events","type":"User","site_admin":false},"body":"I have implemented Palmer's algorithm as described on [wikipedia](https://en.wikipedia.org/wiki/Ore%27s_theorem) and in [his paper](https://www.sciencedirect.com/science/article/pii/S0898122197002253). Palmer's algorithm finds a Hamiltonian cycle in a simple graph where each pair of non-adjacent nodes has the sum of their degrees at least `n` (Ore's condition).\r\n\r\nI have two questions about names:\r\n\r\n- I have intentionally used HamiltonianCycle instead of TSP because I want to make it clear that there is no cost involved. What do you think about this?\r\n- I have named the test function `hasOreProperty`. Is there any better name for it?","created_at":"2018-02-24T00:29:27Z","updated_at":"2018-02-25T13:38:36Z","closed_at":"2018-02-25T13:27:56Z","merged_at":null,"merge_commit_sha":"4c95bf72c856895af1993b96d86c8859326260a4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496/commits","review_comments_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496/comments","review_comment_url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/496/comments","statuses_url":"https://api.github.com/repos/jgrapht/jgrapht/statuses/e6685148613f157a206199e52e75798ad6fc4667","head":{"label":"AlexandruValeanu:palmer","ref":"palmer","sha":"e6685148613f157a206199e52e75798ad6fc4667","user":{"login":"AlexandruValeanu","id":7942531,"avatar_url":"https://avatars2.githubusercontent.com/u/7942531?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandruValeanu","html_url":"https://github.com/AlexandruValeanu","followers_url":"https://api.github.com/users/AlexandruValeanu/followers","following_url":"https://api.github.com/users/AlexandruValeanu/following{/other_user}","gists_url":"https://api.github.com/users/AlexandruValeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandruValeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandruValeanu/subscriptions","organizations_url":"https://api.github.com/users/AlexandruValeanu/orgs","repos_url":"https://api.github.com/users/AlexandruValeanu/repos","events_url":"https://api.github.com/users/AlexandruValeanu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandruValeanu/received_events","type":"User","site_admin":false},"repo":{"id":113733837,"name":"jgrapht","full_name":"AlexandruValeanu/jgrapht","owner":{"login":"AlexandruValeanu","id":7942531,"avatar_url":"https://avatars2.githubusercontent.com/u/7942531?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandruValeanu","html_url":"https://github.com/AlexandruValeanu","followers_url":"https://api.github.com/users/AlexandruValeanu/followers","following_url":"https://api.github.com/users/AlexandruValeanu/following{/other_user}","gists_url":"https://api.github.com/users/AlexandruValeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandruValeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandruValeanu/subscriptions","organizations_url":"https://api.github.com/users/AlexandruValeanu/orgs","repos_url":"https://api.github.com/users/AlexandruValeanu/repos","events_url":"https://api.github.com/users/AlexandruValeanu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandruValeanu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexandruValeanu/jgrapht","description":"Master repository for the JGraphT project","fork":true,"url":"https://api.github.com/repos/AlexandruValeanu/jgrapht","forks_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/forks","keys_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/teams","hooks_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/hooks","issue_events_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/issues/events{/number}","events_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/events","assignees_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/assignees{/user}","branches_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/branches{/branch}","tags_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/tags","blobs_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/languages","stargazers_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/stargazers","contributors_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/contributors","subscribers_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/subscribers","subscription_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/subscription","commits_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/contents/{+path}","compare_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/merges","archive_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/downloads","issues_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/issues{/number}","pulls_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/labels{/name}","releases_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/releases{/id}","deployments_url":"https://api.github.com/repos/AlexandruValeanu/jgrapht/deployments","created_at":"2017-12-10T08:16:26Z","updated_at":"2017-12-10T08:16:29Z","pushed_at":"2018-02-25T13:37:31Z","git_url":"git://github.com/AlexandruValeanu/jgrapht.git","ssh_url":"git@github.com:AlexandruValeanu/jgrapht.git","clone_url":"https://github.com/AlexandruValeanu/jgrapht.git","svn_url":"https://github.com/AlexandruValeanu/jgrapht","homepage":"http://www.jgrapht.org","size":8852,"stargazers_count":0,"watchers_count":0,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jgrapht:master","ref":"master","sha":"84d40ed71d8eccedcf336c3f1b1a05012c608f7c","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-02-23T21:20:07Z","pushed_at":"2018-02-25T13:37:31Z","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":8815,"stargazers_count":1076,"watchers_count":1076,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":424,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":424,"open_issues":41,"watchers":1076,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496"},"html":{"href":"https://github.com/jgrapht/jgrapht/pull/496"},"issue":{"href":"https://api.github.com/repos/jgrapht/jgrapht/issues/496"},"comments":{"href":"https://api.github.com/repos/jgrapht/jgrapht/issues/496/comments"},"review_comments":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496/comments"},"review_comment":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jgrapht/jgrapht/pulls/496/commits"},"statuses":{"href":"https://api.github.com/repos/jgrapht/jgrapht/statuses/e6685148613f157a206199e52e75798ad6fc4667"}},"author_association":"NONE"}}
{"actor":{"display_login":"AlexandruValeanu"}}