{"action":"created","comment":{"url":"https://api.github.com/repos/numenta/nupic.core/pulls/comments/30470642","id":30470642,"diff_hunk":"@@ -0,0 +1,1385 @@\n+/* ---------------------------------------------------------------------\n+ * Numenta Platform for Intelligent Computing (NuPIC)\n+ * Copyright (C) 2013-2015, Numenta, Inc.  Unless you have an agreement\n+ * with Numenta, Inc., for a separate license for this software code, the\n+ * following terms and conditions apply:\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 3 as\n+ * published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n+ * See the GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see http://www.gnu.org/licenses.\n+ *\n+ * http://numenta.org/licenses/\n+ * ----------------------------------------------------------------------\n+ */\n+\n+ /** @file\n+  * Implementation of TemporalMemory\n+  */\n+\n+#include <cstring>\n+#include <iostream>\n+#include <string>\n+#include <iterator>\n+#include <vector>\n+#include <boost/tuple/tuple.hpp>\n+\n+#include <capnp/message.h>\n+#include <capnp/serialize.h>\n+#include <kj/std/iostream.h>\n+\n+#include <nupic/algorithms/Connections.hpp>\n+#include <nupic/algorithms/TemporalMemory.hpp>\n+\n+using namespace std;\n+using namespace nupic;\n+using namespace nupic::algorithms::connections;\n+using namespace nupic::algorithms::temporal_memory;\n+\n+TemporalMemory::TemporalMemory()\n+{\n+  version_ = 1;\n+\n+  // Setup defaults (not all get serialized)","path":"src/nupic/algorithms/TemporalMemory.cpp","position":50,"original_position":50,"commit_id":"9ab68f926c325da1e6ead422856ead8c3038013d","original_commit_id":"9ab68f926c325da1e6ead422856ead8c3038013d","user":{"login":"rcrowder","id":470969,"avatar_url":"https://avatars.githubusercontent.com/u/470969?v=3","gravatar_id":"","url":"https://api.github.com/users/rcrowder","html_url":"https://github.com/rcrowder","followers_url":"https://api.github.com/users/rcrowder/followers","following_url":"https://api.github.com/users/rcrowder/following{/other_user}","gists_url":"https://api.github.com/users/rcrowder/gists{/gist_id}","starred_url":"https://api.github.com/users/rcrowder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcrowder/subscriptions","organizations_url":"https://api.github.com/users/rcrowder/orgs","repos_url":"https://api.github.com/users/rcrowder/repos","events_url":"https://api.github.com/users/rcrowder/events{/privacy}","received_events_url":"https://api.github.com/users/rcrowder/received_events","type":"User","site_admin":false},"body":"This comment is wrong. And with the defaults, was added before realizing that I'd missed out the learningRadius","created_at":"2015-05-17T14:03:15Z","updated_at":"2015-05-17T14:03:15Z","html_url":"https://github.com/numenta/nupic.core/pull/409#discussion_r30470642","pull_request_url":"https://api.github.com/repos/numenta/nupic.core/pulls/409","_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/comments/30470642"},"html":{"href":"https://github.com/numenta/nupic.core/pull/409#discussion_r30470642"},"pull_request":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/409"}}},"pull_request":{"url":"https://api.github.com/repos/numenta/nupic.core/pulls/409","id":34263116,"html_url":"https://github.com/numenta/nupic.core/pull/409","diff_url":"https://github.com/numenta/nupic.core/pull/409.diff","patch_url":"https://github.com/numenta/nupic.core/pull/409.patch","issue_url":"https://api.github.com/repos/numenta/nupic.core/issues/409","number":409,"state":"open","locked":false,"title":"314 port of tm","user":{"login":"rcrowder","id":470969,"avatar_url":"https://avatars.githubusercontent.com/u/470969?v=3","gravatar_id":"","url":"https://api.github.com/users/rcrowder","html_url":"https://github.com/rcrowder","followers_url":"https://api.github.com/users/rcrowder/followers","following_url":"https://api.github.com/users/rcrowder/following{/other_user}","gists_url":"https://api.github.com/users/rcrowder/gists{/gist_id}","starred_url":"https://api.github.com/users/rcrowder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcrowder/subscriptions","organizations_url":"https://api.github.com/users/rcrowder/orgs","repos_url":"https://api.github.com/users/rcrowder/repos","events_url":"https://api.github.com/users/rcrowder/events{/privacy}","received_events_url":"https://api.github.com/users/rcrowder/received_events","type":"User","site_admin":false},"body":"Fixes #314","created_at":"2015-04-28T12:52:11Z","updated_at":"2015-05-17T14:03:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96fd2604f378a291074fa7594f15c7e6718458d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numenta/nupic.core/pulls/409/commits","review_comments_url":"https://api.github.com/repos/numenta/nupic.core/pulls/409/comments","review_comment_url":"https://api.github.com/repos/numenta/nupic.core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/nupic.core/issues/409/comments","statuses_url":"https://api.github.com/repos/numenta/nupic.core/statuses/9ab68f926c325da1e6ead422856ead8c3038013d","head":{"label":"rcrowder:314-Port-Of-TM","ref":"314-Port-Of-TM","sha":"9ab68f926c325da1e6ead422856ead8c3038013d","user":{"login":"rcrowder","id":470969,"avatar_url":"https://avatars.githubusercontent.com/u/470969?v=3","gravatar_id":"","url":"https://api.github.com/users/rcrowder","html_url":"https://github.com/rcrowder","followers_url":"https://api.github.com/users/rcrowder/followers","following_url":"https://api.github.com/users/rcrowder/following{/other_user}","gists_url":"https://api.github.com/users/rcrowder/gists{/gist_id}","starred_url":"https://api.github.com/users/rcrowder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcrowder/subscriptions","organizations_url":"https://api.github.com/users/rcrowder/orgs","repos_url":"https://api.github.com/users/rcrowder/repos","events_url":"https://api.github.com/users/rcrowder/events{/privacy}","received_events_url":"https://api.github.com/users/rcrowder/received_events","type":"User","site_admin":false},"repo":{"id":31445069,"name":"nupic.core","full_name":"rcrowder/nupic.core","owner":{"login":"rcrowder","id":470969,"avatar_url":"https://avatars.githubusercontent.com/u/470969?v=3","gravatar_id":"","url":"https://api.github.com/users/rcrowder","html_url":"https://github.com/rcrowder","followers_url":"https://api.github.com/users/rcrowder/followers","following_url":"https://api.github.com/users/rcrowder/following{/other_user}","gists_url":"https://api.github.com/users/rcrowder/gists{/gist_id}","starred_url":"https://api.github.com/users/rcrowder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcrowder/subscriptions","organizations_url":"https://api.github.com/users/rcrowder/orgs","repos_url":"https://api.github.com/users/rcrowder/repos","events_url":"https://api.github.com/users/rcrowder/events{/privacy}","received_events_url":"https://api.github.com/users/rcrowder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcrowder/nupic.core","description":"Implementation of core NuPIC algorithms in C++ (under construction)","fork":true,"url":"https://api.github.com/repos/rcrowder/nupic.core","forks_url":"https://api.github.com/repos/rcrowder/nupic.core/forks","keys_url":"https://api.github.com/repos/rcrowder/nupic.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcrowder/nupic.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcrowder/nupic.core/teams","hooks_url":"https://api.github.com/repos/rcrowder/nupic.core/hooks","issue_events_url":"https://api.github.com/repos/rcrowder/nupic.core/issues/events{/number}","events_url":"https://api.github.com/repos/rcrowder/nupic.core/events","assignees_url":"https://api.github.com/repos/rcrowder/nupic.core/assignees{/user}","branches_url":"https://api.github.com/repos/rcrowder/nupic.core/branches{/branch}","tags_url":"https://api.github.com/repos/rcrowder/nupic.core/tags","blobs_url":"https://api.github.com/repos/rcrowder/nupic.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcrowder/nupic.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcrowder/nupic.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcrowder/nupic.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcrowder/nupic.core/statuses/{sha}","languages_url":"https://api.github.com/repos/rcrowder/nupic.core/languages","stargazers_url":"https://api.github.com/repos/rcrowder/nupic.core/stargazers","contributors_url":"https://api.github.com/repos/rcrowder/nupic.core/contributors","subscribers_url":"https://api.github.com/repos/rcrowder/nupic.core/subscribers","subscription_url":"https://api.github.com/repos/rcrowder/nupic.core/subscription","commits_url":"https://api.github.com/repos/rcrowder/nupic.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcrowder/nupic.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcrowder/nupic.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcrowder/nupic.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcrowder/nupic.core/contents/{+path}","compare_url":"https://api.github.com/repos/rcrowder/nupic.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcrowder/nupic.core/merges","archive_url":"https://api.github.com/repos/rcrowder/nupic.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcrowder/nupic.core/downloads","issues_url":"https://api.github.com/repos/rcrowder/nupic.core/issues{/number}","pulls_url":"https://api.github.com/repos/rcrowder/nupic.core/pulls{/number}","milestones_url":"https://api.github.com/repos/rcrowder/nupic.core/milestones{/number}","notifications_url":"https://api.github.com/repos/rcrowder/nupic.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcrowder/nupic.core/labels{/name}","releases_url":"https://api.github.com/repos/rcrowder/nupic.core/releases{/id}","created_at":"2015-02-28T00:18:31Z","updated_at":"2015-04-28T09:38:50Z","pushed_at":"2015-05-17T13:48:46Z","git_url":"git://github.com/rcrowder/nupic.core.git","ssh_url":"git@github.com:rcrowder/nupic.core.git","clone_url":"https://github.com/rcrowder/nupic.core.git","svn_url":"https://github.com/rcrowder/nupic.core","homepage":"http://numenta.org","size":78110,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"numenta:master","ref":"master","sha":"9a19cbdb41a60041ec7ced3a4bacedc75aed7938","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":16366081,"name":"nupic.core","full_name":"numenta/nupic.core","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/nupic.core","description":"Implementation of core NuPIC algorithms in C++ (under construction)","fork":false,"url":"https://api.github.com/repos/numenta/nupic.core","forks_url":"https://api.github.com/repos/numenta/nupic.core/forks","keys_url":"https://api.github.com/repos/numenta/nupic.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/nupic.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/nupic.core/teams","hooks_url":"https://api.github.com/repos/numenta/nupic.core/hooks","issue_events_url":"https://api.github.com/repos/numenta/nupic.core/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/nupic.core/events","assignees_url":"https://api.github.com/repos/numenta/nupic.core/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/nupic.core/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/nupic.core/tags","blobs_url":"https://api.github.com/repos/numenta/nupic.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/nupic.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/nupic.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/nupic.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/nupic.core/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/nupic.core/languages","stargazers_url":"https://api.github.com/repos/numenta/nupic.core/stargazers","contributors_url":"https://api.github.com/repos/numenta/nupic.core/contributors","subscribers_url":"https://api.github.com/repos/numenta/nupic.core/subscribers","subscription_url":"https://api.github.com/repos/numenta/nupic.core/subscription","commits_url":"https://api.github.com/repos/numenta/nupic.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/nupic.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/nupic.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/nupic.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/nupic.core/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/nupic.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/nupic.core/merges","archive_url":"https://api.github.com/repos/numenta/nupic.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/nupic.core/downloads","issues_url":"https://api.github.com/repos/numenta/nupic.core/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/nupic.core/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/nupic.core/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/nupic.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/nupic.core/labels{/name}","releases_url":"https://api.github.com/repos/numenta/nupic.core/releases{/id}","created_at":"2014-01-30T02:13:40Z","updated_at":"2015-05-17T12:34:32Z","pushed_at":"2015-05-17T13:48:46Z","git_url":"git://github.com/numenta/nupic.core.git","ssh_url":"git@github.com:numenta/nupic.core.git","clone_url":"https://github.com/numenta/nupic.core.git","svn_url":"https://github.com/numenta/nupic.core","homepage":"http://numenta.org","size":95615,"stargazers_count":121,"watchers_count":121,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":94,"forks":105,"open_issues":94,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/409"},"html":{"href":"https://github.com/numenta/nupic.core/pull/409"},"issue":{"href":"https://api.github.com/repos/numenta/nupic.core/issues/409"},"comments":{"href":"https://api.github.com/repos/numenta/nupic.core/issues/409/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/409/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/nupic.core/pulls/409/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/nupic.core/statuses/9ab68f926c325da1e6ead422856ead8c3038013d"}}}}