{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/quad/pulls/comments/43962189","id":43962189,"diff_hunk":"@@ -0,0 +1,159 @@\n+// Copyright ©2015 The gonum Authors. All rights reserved.\n+// Use of this source code is governed by a BSD-style\n+// license that can be found in the LICENSE file.\n+\n+// Package quad provides numeric integration of single variable functions by quadrature.\n+//\n+package quad\n+\n+import (\n+\t\"math\"\n+\t\"sync\"\n+)\n+\n+// FixedLocationer computes a set of quadrature locations and weights and stores\n+// them in-place into x and weight. The number of points generated is equal to\n+// the len(x). The weights and locations should be chosen such that\n+//  int_min^max f(x) dx ≈ \\sum_i w_i f(x_i)\n+type FixedLocationer interface {\n+\tFixedLocations(x, weight []float64, min, max float64)\n+}\n+\n+// FixedLocationSingle returns the location and weight for element k in a\n+// fixed quadrature rule with n total samples and bounds between min and max.\n+type FixedLocationSingler interface {\n+\tFixedLocationSingle(n, k int, min, max float64) (x, weight float64)\n+}\n+\n+// Fixed approximates the integral of the function f from min to max using a fixed\n+// n-point quadrature rule. During evaluation, f will be evaluated n times using\n+// the weights and locations specified by rule. That is, Fixed estimates\n+//  int_min^max f(x) dx ≈ \\sum_i w_i f(x_i)\n+// If rule is nil, an acceptable default is chosen, otherwise it is\n+// assumed that the properties of the integral match the assumptions of rule.\n+// For example, Legendre assumes that the integration bounds are finite. If\n+// rule is also a FixedLocationsSingler, the quadrature points are computed\n+// individually rather than as a unit.\n+//\n+// If concurrent <= 0, f is evaluated serially, while if concurrent > 0 f is\n+// evaluated may be evaluated with at most concurrent simultaneous evaluations.","path":"quad.go","position":39,"original_position":39,"commit_id":"503603fa3c16733b1144b0d4d270c186951b9118","original_commit_id":"503603fa3c16733b1144b0d4d270c186951b9118","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":"Fix `is evaluated may be evaluated`","created_at":"2015-11-05T00:29:38Z","updated_at":"2015-11-05T00:29:38Z","html_url":"https://github.com/gonum/quad/pull/1#discussion_r43962189","pull_request_url":"https://api.github.com/repos/gonum/quad/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/gonum/quad/pulls/comments/43962189"},"html":{"href":"https://github.com/gonum/quad/pull/1#discussion_r43962189"},"pull_request":{"href":"https://api.github.com/repos/gonum/quad/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/quad/pulls/1","id":49749467,"html_url":"https://github.com/gonum/quad/pull/1","diff_url":"https://github.com/gonum/quad/pull/1.diff","patch_url":"https://github.com/gonum/quad/pull/1.patch","issue_url":"https://api.github.com/repos/gonum/quad/issues/1","number":1,"state":"open","locked":false,"title":"Add Fixed quadrature algorithm and Legendre integration scheme","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-04T21:39:50Z","updated_at":"2015-11-05T00:29:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83f3a6e8b2e4a2107c781ef94bdc029b7a833869","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/quad/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gonum/quad/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gonum/quad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/quad/issues/1/comments","statuses_url":"https://api.github.com/repos/gonum/quad/statuses/503603fa3c16733b1144b0d4d270c186951b9118","head":{"label":"gonum:addfixed","ref":"addfixed","sha":"503603fa3c16733b1144b0d4d270c186951b9118","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":45565768,"name":"quad","full_name":"gonum/quad","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/quad","description":"quad implements a set of quadrature routines for the Go language","fork":false,"url":"https://api.github.com/repos/gonum/quad","forks_url":"https://api.github.com/repos/gonum/quad/forks","keys_url":"https://api.github.com/repos/gonum/quad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/quad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/quad/teams","hooks_url":"https://api.github.com/repos/gonum/quad/hooks","issue_events_url":"https://api.github.com/repos/gonum/quad/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/quad/events","assignees_url":"https://api.github.com/repos/gonum/quad/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/quad/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/quad/tags","blobs_url":"https://api.github.com/repos/gonum/quad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/quad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/quad/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/quad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/quad/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/quad/languages","stargazers_url":"https://api.github.com/repos/gonum/quad/stargazers","contributors_url":"https://api.github.com/repos/gonum/quad/contributors","subscribers_url":"https://api.github.com/repos/gonum/quad/subscribers","subscription_url":"https://api.github.com/repos/gonum/quad/subscription","commits_url":"https://api.github.com/repos/gonum/quad/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/quad/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/quad/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/quad/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/quad/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/quad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/quad/merges","archive_url":"https://api.github.com/repos/gonum/quad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/quad/downloads","issues_url":"https://api.github.com/repos/gonum/quad/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/quad/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/quad/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/quad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/quad/labels{/name}","releases_url":"https://api.github.com/repos/gonum/quad/releases{/id}","created_at":"2015-11-04T20:34:34Z","updated_at":"2015-11-04T20:34:34Z","pushed_at":"2015-11-04T23:39:01Z","git_url":"git://github.com/gonum/quad.git","ssh_url":"git@github.com:gonum/quad.git","clone_url":"https://github.com/gonum/quad.git","svn_url":"https://github.com/gonum/quad","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"33258b7c6c9d4b20bff05b91e4cf4875cd55d6f0","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":45565768,"name":"quad","full_name":"gonum/quad","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/quad","description":"quad implements a set of quadrature routines for the Go language","fork":false,"url":"https://api.github.com/repos/gonum/quad","forks_url":"https://api.github.com/repos/gonum/quad/forks","keys_url":"https://api.github.com/repos/gonum/quad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/quad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/quad/teams","hooks_url":"https://api.github.com/repos/gonum/quad/hooks","issue_events_url":"https://api.github.com/repos/gonum/quad/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/quad/events","assignees_url":"https://api.github.com/repos/gonum/quad/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/quad/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/quad/tags","blobs_url":"https://api.github.com/repos/gonum/quad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/quad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/quad/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/quad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/quad/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/quad/languages","stargazers_url":"https://api.github.com/repos/gonum/quad/stargazers","contributors_url":"https://api.github.com/repos/gonum/quad/contributors","subscribers_url":"https://api.github.com/repos/gonum/quad/subscribers","subscription_url":"https://api.github.com/repos/gonum/quad/subscription","commits_url":"https://api.github.com/repos/gonum/quad/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/quad/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/quad/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/quad/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/quad/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/quad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/quad/merges","archive_url":"https://api.github.com/repos/gonum/quad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/quad/downloads","issues_url":"https://api.github.com/repos/gonum/quad/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/quad/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/quad/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/quad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/quad/labels{/name}","releases_url":"https://api.github.com/repos/gonum/quad/releases{/id}","created_at":"2015-11-04T20:34:34Z","updated_at":"2015-11-04T20:34:34Z","pushed_at":"2015-11-04T23:39:01Z","git_url":"git://github.com/gonum/quad.git","ssh_url":"git@github.com:gonum/quad.git","clone_url":"https://github.com/gonum/quad.git","svn_url":"https://github.com/gonum/quad","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/quad/pulls/1"},"html":{"href":"https://github.com/gonum/quad/pull/1"},"issue":{"href":"https://api.github.com/repos/gonum/quad/issues/1"},"comments":{"href":"https://api.github.com/repos/gonum/quad/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/quad/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/quad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/quad/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/quad/statuses/503603fa3c16733b1144b0d4d270c186951b9118"}}}}