{"action":"created","comment":{"url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/comments/59195804","id":59195804,"diff_hunk":"@@ -0,0 +1,51 @@\n+module FourierTransform\n+  module Common\n+    include Math\n+\n+    DIRECT = 1\n+    REVERSE = -1\n+\n+    def self.included(base)\n+      base.class.send(:define_method, :direct) do |values|\n+        transform(DIRECT, 1.0 / values.size, values)\n+      end\n+      base.class.send(:define_method, :reverse) do |values|\n+        transform(REVERSE, values.size, values)\n+      end\n+\n+      base.class.send(:define_method, :complete) do |values|\n+        direct_result = transform(DIRECT, 1.0 / values.size, values)\n+        reverse_result = transform(REVERSE, direct_result.size, direct_result)\n+\n+        {\n+          direct: direct_result,\n+          reverse: reverse_result\n+        }\n+      end\n+\n+      base.class.send(:define_method, :complete_abs) do |values|\n+        direct_result = transform(DIRECT, 1.0 / values.size, values)\n+        reverse_result = transform(REVERSE, direct_result.size, direct_result)\n+\n+        p reverse_result\n+\n+        {\n+          direct: direct_result.map { |v| v.abs },","path":"app/util/fourier_transform/common.rb","position":33,"original_position":33,"commit_id":"9fa2fe55356e30ca27f6cf86a48c2734375ade83","original_commit_id":"9fa2fe55356e30ca27f6cf86a48c2734375ade83","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Pass `&:abs` as an argument to `map` instead of a block.","created_at":"2016-04-11T12:32:59Z","updated_at":"2016-04-11T12:32:59Z","html_url":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8#discussion_r59195804","pull_request_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/comments/59195804"},"html":{"href":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8#discussion_r59195804"},"pull_request":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8","id":65985672,"html_url":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8","diff_url":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8.diff","patch_url":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8.patch","issue_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/8","number":8,"state":"open","locked":false,"title":"7: convolution and correlation","user":{"login":"vmakoed","id":11092719,"avatar_url":"https://avatars.githubusercontent.com/u/11092719?v=3","gravatar_id":"","url":"https://api.github.com/users/vmakoed","html_url":"https://github.com/vmakoed","followers_url":"https://api.github.com/users/vmakoed/followers","following_url":"https://api.github.com/users/vmakoed/following{/other_user}","gists_url":"https://api.github.com/users/vmakoed/gists{/gist_id}","starred_url":"https://api.github.com/users/vmakoed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmakoed/subscriptions","organizations_url":"https://api.github.com/users/vmakoed/orgs","repos_url":"https://api.github.com/users/vmakoed/repos","events_url":"https://api.github.com/users/vmakoed/events{/privacy}","received_events_url":"https://api.github.com/users/vmakoed/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-11T12:32:47Z","updated_at":"2016-04-11T12:32:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5bb88c6d2503b93787d302db9b1edc307d9c461","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8/commits","review_comments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8/comments","review_comment_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/8/comments","statuses_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/statuses/9fa2fe55356e30ca27f6cf86a48c2734375ade83","head":{"label":"evgeniy-kunitsa:vm/feature/7-Convolution-correlation","ref":"vm/feature/7-Convolution-correlation","sha":"9fa2fe55356e30ca27f6cf86a48c2734375ade83","user":{"login":"evgeniy-kunitsa","id":11280208,"avatar_url":"https://avatars.githubusercontent.com/u/11280208?v=3","gravatar_id":"","url":"https://api.github.com/users/evgeniy-kunitsa","html_url":"https://github.com/evgeniy-kunitsa","followers_url":"https://api.github.com/users/evgeniy-kunitsa/followers","following_url":"https://api.github.com/users/evgeniy-kunitsa/following{/other_user}","gists_url":"https://api.github.com/users/evgeniy-kunitsa/gists{/gist_id}","starred_url":"https://api.github.com/users/evgeniy-kunitsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgeniy-kunitsa/subscriptions","organizations_url":"https://api.github.com/users/evgeniy-kunitsa/orgs","repos_url":"https://api.github.com/users/evgeniy-kunitsa/repos","events_url":"https://api.github.com/users/evgeniy-kunitsa/events{/privacy}","received_events_url":"https://api.github.com/users/evgeniy-kunitsa/received_events","type":"User","site_admin":false},"repo":{"id":50796800,"name":"fourier_transform","full_name":"evgeniy-kunitsa/fourier_transform","owner":{"login":"evgeniy-kunitsa","id":11280208,"avatar_url":"https://avatars.githubusercontent.com/u/11280208?v=3","gravatar_id":"","url":"https://api.github.com/users/evgeniy-kunitsa","html_url":"https://github.com/evgeniy-kunitsa","followers_url":"https://api.github.com/users/evgeniy-kunitsa/followers","following_url":"https://api.github.com/users/evgeniy-kunitsa/following{/other_user}","gists_url":"https://api.github.com/users/evgeniy-kunitsa/gists{/gist_id}","starred_url":"https://api.github.com/users/evgeniy-kunitsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgeniy-kunitsa/subscriptions","organizations_url":"https://api.github.com/users/evgeniy-kunitsa/orgs","repos_url":"https://api.github.com/users/evgeniy-kunitsa/repos","events_url":"https://api.github.com/users/evgeniy-kunitsa/events{/privacy}","received_events_url":"https://api.github.com/users/evgeniy-kunitsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evgeniy-kunitsa/fourier_transform","description":"","fork":false,"url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform","forks_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/forks","keys_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/teams","hooks_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/hooks","issue_events_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/events{/number}","events_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/events","assignees_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/assignees{/user}","branches_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/branches{/branch}","tags_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/tags","blobs_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/refs{/sha}","trees_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/statuses/{sha}","languages_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/languages","stargazers_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/stargazers","contributors_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/contributors","subscribers_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/subscribers","subscription_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/subscription","commits_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/commits{/sha}","git_commits_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/commits{/sha}","comments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/comments{/number}","issue_comment_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/comments{/number}","contents_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/contents/{+path}","compare_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/merges","archive_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/downloads","issues_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues{/number}","pulls_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls{/number}","milestones_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/milestones{/number}","notifications_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/labels{/name}","releases_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/releases{/id}","deployments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/deployments","created_at":"2016-01-31T21:39:27Z","updated_at":"2016-01-31T21:40:00Z","pushed_at":"2016-04-11T12:32:48Z","git_url":"git://github.com/evgeniy-kunitsa/fourier_transform.git","ssh_url":"git@github.com:evgeniy-kunitsa/fourier_transform.git","clone_url":"https://github.com/evgeniy-kunitsa/fourier_transform.git","svn_url":"https://github.com/evgeniy-kunitsa/fourier_transform","homepage":null,"size":1848,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"evgeniy-kunitsa:master","ref":"master","sha":"bea87ea8ae46b2da1802defcf6711bc704105856","user":{"login":"evgeniy-kunitsa","id":11280208,"avatar_url":"https://avatars.githubusercontent.com/u/11280208?v=3","gravatar_id":"","url":"https://api.github.com/users/evgeniy-kunitsa","html_url":"https://github.com/evgeniy-kunitsa","followers_url":"https://api.github.com/users/evgeniy-kunitsa/followers","following_url":"https://api.github.com/users/evgeniy-kunitsa/following{/other_user}","gists_url":"https://api.github.com/users/evgeniy-kunitsa/gists{/gist_id}","starred_url":"https://api.github.com/users/evgeniy-kunitsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgeniy-kunitsa/subscriptions","organizations_url":"https://api.github.com/users/evgeniy-kunitsa/orgs","repos_url":"https://api.github.com/users/evgeniy-kunitsa/repos","events_url":"https://api.github.com/users/evgeniy-kunitsa/events{/privacy}","received_events_url":"https://api.github.com/users/evgeniy-kunitsa/received_events","type":"User","site_admin":false},"repo":{"id":50796800,"name":"fourier_transform","full_name":"evgeniy-kunitsa/fourier_transform","owner":{"login":"evgeniy-kunitsa","id":11280208,"avatar_url":"https://avatars.githubusercontent.com/u/11280208?v=3","gravatar_id":"","url":"https://api.github.com/users/evgeniy-kunitsa","html_url":"https://github.com/evgeniy-kunitsa","followers_url":"https://api.github.com/users/evgeniy-kunitsa/followers","following_url":"https://api.github.com/users/evgeniy-kunitsa/following{/other_user}","gists_url":"https://api.github.com/users/evgeniy-kunitsa/gists{/gist_id}","starred_url":"https://api.github.com/users/evgeniy-kunitsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgeniy-kunitsa/subscriptions","organizations_url":"https://api.github.com/users/evgeniy-kunitsa/orgs","repos_url":"https://api.github.com/users/evgeniy-kunitsa/repos","events_url":"https://api.github.com/users/evgeniy-kunitsa/events{/privacy}","received_events_url":"https://api.github.com/users/evgeniy-kunitsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evgeniy-kunitsa/fourier_transform","description":"","fork":false,"url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform","forks_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/forks","keys_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/teams","hooks_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/hooks","issue_events_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/events{/number}","events_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/events","assignees_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/assignees{/user}","branches_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/branches{/branch}","tags_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/tags","blobs_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/refs{/sha}","trees_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/statuses/{sha}","languages_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/languages","stargazers_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/stargazers","contributors_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/contributors","subscribers_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/subscribers","subscription_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/subscription","commits_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/commits{/sha}","git_commits_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/git/commits{/sha}","comments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/comments{/number}","issue_comment_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/comments{/number}","contents_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/contents/{+path}","compare_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/merges","archive_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/downloads","issues_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues{/number}","pulls_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls{/number}","milestones_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/milestones{/number}","notifications_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/labels{/name}","releases_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/releases{/id}","deployments_url":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/deployments","created_at":"2016-01-31T21:39:27Z","updated_at":"2016-01-31T21:40:00Z","pushed_at":"2016-04-11T12:32:48Z","git_url":"git://github.com/evgeniy-kunitsa/fourier_transform.git","ssh_url":"git@github.com:evgeniy-kunitsa/fourier_transform.git","clone_url":"https://github.com/evgeniy-kunitsa/fourier_transform.git","svn_url":"https://github.com/evgeniy-kunitsa/fourier_transform","homepage":null,"size":1848,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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/evgeniy-kunitsa/fourier_transform/pulls/8"},"html":{"href":"https://github.com/evgeniy-kunitsa/fourier_transform/pull/8"},"issue":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/8"},"comments":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/evgeniy-kunitsa/fourier_transform/statuses/9fa2fe55356e30ca27f6cf86a48c2734375ade83"}}}}