{"action":"created","comment":{"url":"https://api.github.com/repos/swift-nav/plover/pulls/comments/65239333","id":65239333,"diff_hunk":"@@ -0,0 +1,103 @@\n+import prelude;\n+\n+-- \"Matrix Computations\" 4th ed., Golub and Van Loan.  Algorithm\n+-- 4.1.2, the LDL^T decomposition for a symmetric, positive-definite\n+-- matrix.\n+--\n+-- On success, the argument A now contains the lower-triangular factor\n+-- L and the diagonal vector D.\n+ldlt {m}\n+  (inout A :: double[m, m])\n+  :: s8 := (\n+\n+  v :: double[m];\n+\n+  for j in 0:m -> (\n+    -- Compute v[1:j].\n+    for i in 0:j -> (\n+       v[i] <- A[j, i] * A[i, i];\n+    );\n+    v[j] <- A[j, j] - A[j, 0:j] * v[0:j];\n+\n+    -- Store d[j].\n+    A[j, j] <- v[j];\n+\n+    -- Compute L[j+1:n, j].\n+    A[j+1:m, j] <- (A[j+1:m, j] - A[j+1:m, 0:j]*v[0:j]) / v[j];\n+  );\n+\n+  return 0;\n+);\n+\n+-- \"Advanced Kalman Filtering, Least-Squares and Modeling.\", Bruce\n+-- P. Gibbs.  Algorithm 10.2-2, the UDU^T decomposition for a\n+-- symmetric, positive-definite matrix.\n+--\n+-- On exit, the argument A now contains the upper-triangular factor U\n+-- and the diagonal vector D.\n+udut {m}\n+  (inout A :: double[m, m])\n+  :: Void := (\n+  for j in m-1:0:-1 -> (  -- column loop","path":"examples/cholesky.plv","position":41,"original_position":41,"commit_id":"c4da23df51e67cbe4c0a8dca14d587831e549fe0","original_commit_id":"c4da23df51e67cbe4c0a8dca14d587831e549fe0","user":{"login":"scottswift","id":14615720,"avatar_url":"https://avatars.githubusercontent.com/u/14615720?v=3","gravatar_id":"","url":"https://api.github.com/users/scottswift","html_url":"https://github.com/scottswift","followers_url":"https://api.github.com/users/scottswift/followers","following_url":"https://api.github.com/users/scottswift/following{/other_user}","gists_url":"https://api.github.com/users/scottswift/gists{/gist_id}","starred_url":"https://api.github.com/users/scottswift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottswift/subscriptions","organizations_url":"https://api.github.com/users/scottswift/orgs","repos_url":"https://api.github.com/users/scottswift/repos","events_url":"https://api.github.com/users/scottswift/events{/privacy}","received_events_url":"https://api.github.com/users/scottswift/received_events","type":"User","site_admin":false},"body":"for someone comparing to the book, do you think `for j in m-1..1:-1 -> ...` is clearer?","created_at":"2016-05-31T18:39:07Z","updated_at":"2016-05-31T18:39:07Z","html_url":"https://github.com/swift-nav/plover/pull/53#discussion_r65239333","pull_request_url":"https://api.github.com/repos/swift-nav/plover/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/comments/65239333"},"html":{"href":"https://github.com/swift-nav/plover/pull/53#discussion_r65239333"},"pull_request":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/swift-nav/plover/pulls/53","id":71886240,"html_url":"https://github.com/swift-nav/plover/pull/53","diff_url":"https://github.com/swift-nav/plover/pull/53.diff","patch_url":"https://github.com/swift-nav/plover/pull/53.patch","issue_url":"https://api.github.com/repos/swift-nav/plover/issues/53","number":53,"state":"open","locked":false,"title":"Cholesky","user":{"login":"peddie","id":163241,"avatar_url":"https://avatars.githubusercontent.com/u/163241?v=3","gravatar_id":"","url":"https://api.github.com/users/peddie","html_url":"https://github.com/peddie","followers_url":"https://api.github.com/users/peddie/followers","following_url":"https://api.github.com/users/peddie/following{/other_user}","gists_url":"https://api.github.com/users/peddie/gists{/gist_id}","starred_url":"https://api.github.com/users/peddie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peddie/subscriptions","organizations_url":"https://api.github.com/users/peddie/orgs","repos_url":"https://api.github.com/users/peddie/repos","events_url":"https://api.github.com/users/peddie/events{/privacy}","received_events_url":"https://api.github.com/users/peddie/received_events","type":"User","site_admin":false},"body":"Adds some useful decompositions for SPD matrices:\r\n\r\n - LDL^T\r\n - UDU^T via a slightly different algorithm\r\n - Cholesky\r\n - Rank-1 updating of Cholesky factors","created_at":"2016-05-30T11:01:59Z","updated_at":"2016-05-31T18:39:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b23c7ad4e9ad3c7d24e5e72215fece84ff35f39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/swift-nav/plover/pulls/53/commits","review_comments_url":"https://api.github.com/repos/swift-nav/plover/pulls/53/comments","review_comment_url":"https://api.github.com/repos/swift-nav/plover/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swift-nav/plover/issues/53/comments","statuses_url":"https://api.github.com/repos/swift-nav/plover/statuses/c4da23df51e67cbe4c0a8dca14d587831e549fe0","head":{"label":"swift-nav:cholesky","ref":"cholesky","sha":"c4da23df51e67cbe4c0a8dca14d587831e549fe0","user":{"login":"swift-nav","id":1069835,"avatar_url":"https://avatars.githubusercontent.com/u/1069835?v=3","gravatar_id":"","url":"https://api.github.com/users/swift-nav","html_url":"https://github.com/swift-nav","followers_url":"https://api.github.com/users/swift-nav/followers","following_url":"https://api.github.com/users/swift-nav/following{/other_user}","gists_url":"https://api.github.com/users/swift-nav/gists{/gist_id}","starred_url":"https://api.github.com/users/swift-nav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swift-nav/subscriptions","organizations_url":"https://api.github.com/users/swift-nav/orgs","repos_url":"https://api.github.com/users/swift-nav/repos","events_url":"https://api.github.com/users/swift-nav/events{/privacy}","received_events_url":"https://api.github.com/users/swift-nav/received_events","type":"Organization","site_admin":false},"repo":{"id":25475827,"name":"plover","full_name":"swift-nav/plover","owner":{"login":"swift-nav","id":1069835,"avatar_url":"https://avatars.githubusercontent.com/u/1069835?v=3","gravatar_id":"","url":"https://api.github.com/users/swift-nav","html_url":"https://github.com/swift-nav","followers_url":"https://api.github.com/users/swift-nav/followers","following_url":"https://api.github.com/users/swift-nav/following{/other_user}","gists_url":"https://api.github.com/users/swift-nav/gists{/gist_id}","starred_url":"https://api.github.com/users/swift-nav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swift-nav/subscriptions","organizations_url":"https://api.github.com/users/swift-nav/orgs","repos_url":"https://api.github.com/users/swift-nav/repos","events_url":"https://api.github.com/users/swift-nav/events{/privacy}","received_events_url":"https://api.github.com/users/swift-nav/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swift-nav/plover","description":"Plover is a language for matrix algebra on embedded systems.","fork":false,"url":"https://api.github.com/repos/swift-nav/plover","forks_url":"https://api.github.com/repos/swift-nav/plover/forks","keys_url":"https://api.github.com/repos/swift-nav/plover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swift-nav/plover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swift-nav/plover/teams","hooks_url":"https://api.github.com/repos/swift-nav/plover/hooks","issue_events_url":"https://api.github.com/repos/swift-nav/plover/issues/events{/number}","events_url":"https://api.github.com/repos/swift-nav/plover/events","assignees_url":"https://api.github.com/repos/swift-nav/plover/assignees{/user}","branches_url":"https://api.github.com/repos/swift-nav/plover/branches{/branch}","tags_url":"https://api.github.com/repos/swift-nav/plover/tags","blobs_url":"https://api.github.com/repos/swift-nav/plover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swift-nav/plover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swift-nav/plover/git/refs{/sha}","trees_url":"https://api.github.com/repos/swift-nav/plover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swift-nav/plover/statuses/{sha}","languages_url":"https://api.github.com/repos/swift-nav/plover/languages","stargazers_url":"https://api.github.com/repos/swift-nav/plover/stargazers","contributors_url":"https://api.github.com/repos/swift-nav/plover/contributors","subscribers_url":"https://api.github.com/repos/swift-nav/plover/subscribers","subscription_url":"https://api.github.com/repos/swift-nav/plover/subscription","commits_url":"https://api.github.com/repos/swift-nav/plover/commits{/sha}","git_commits_url":"https://api.github.com/repos/swift-nav/plover/git/commits{/sha}","comments_url":"https://api.github.com/repos/swift-nav/plover/comments{/number}","issue_comment_url":"https://api.github.com/repos/swift-nav/plover/issues/comments{/number}","contents_url":"https://api.github.com/repos/swift-nav/plover/contents/{+path}","compare_url":"https://api.github.com/repos/swift-nav/plover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swift-nav/plover/merges","archive_url":"https://api.github.com/repos/swift-nav/plover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swift-nav/plover/downloads","issues_url":"https://api.github.com/repos/swift-nav/plover/issues{/number}","pulls_url":"https://api.github.com/repos/swift-nav/plover/pulls{/number}","milestones_url":"https://api.github.com/repos/swift-nav/plover/milestones{/number}","notifications_url":"https://api.github.com/repos/swift-nav/plover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swift-nav/plover/labels{/name}","releases_url":"https://api.github.com/repos/swift-nav/plover/releases{/id}","deployments_url":"https://api.github.com/repos/swift-nav/plover/deployments","created_at":"2014-10-20T16:38:32Z","updated_at":"2016-05-11T13:20:08Z","pushed_at":"2016-05-30T11:05:54Z","git_url":"git://github.com/swift-nav/plover.git","ssh_url":"git@github.com:swift-nav/plover.git","clone_url":"https://github.com/swift-nav/plover.git","svn_url":"https://github.com/swift-nav/plover","homepage":"http://swift-nav.github.io/plover","size":770,"stargazers_count":35,"watchers_count":35,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":20,"forks":13,"open_issues":20,"watchers":35,"default_branch":"master"}},"base":{"label":"swift-nav:master","ref":"master","sha":"e3e80a84a9fe9b922cdcf2d815116b8614061435","user":{"login":"swift-nav","id":1069835,"avatar_url":"https://avatars.githubusercontent.com/u/1069835?v=3","gravatar_id":"","url":"https://api.github.com/users/swift-nav","html_url":"https://github.com/swift-nav","followers_url":"https://api.github.com/users/swift-nav/followers","following_url":"https://api.github.com/users/swift-nav/following{/other_user}","gists_url":"https://api.github.com/users/swift-nav/gists{/gist_id}","starred_url":"https://api.github.com/users/swift-nav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swift-nav/subscriptions","organizations_url":"https://api.github.com/users/swift-nav/orgs","repos_url":"https://api.github.com/users/swift-nav/repos","events_url":"https://api.github.com/users/swift-nav/events{/privacy}","received_events_url":"https://api.github.com/users/swift-nav/received_events","type":"Organization","site_admin":false},"repo":{"id":25475827,"name":"plover","full_name":"swift-nav/plover","owner":{"login":"swift-nav","id":1069835,"avatar_url":"https://avatars.githubusercontent.com/u/1069835?v=3","gravatar_id":"","url":"https://api.github.com/users/swift-nav","html_url":"https://github.com/swift-nav","followers_url":"https://api.github.com/users/swift-nav/followers","following_url":"https://api.github.com/users/swift-nav/following{/other_user}","gists_url":"https://api.github.com/users/swift-nav/gists{/gist_id}","starred_url":"https://api.github.com/users/swift-nav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swift-nav/subscriptions","organizations_url":"https://api.github.com/users/swift-nav/orgs","repos_url":"https://api.github.com/users/swift-nav/repos","events_url":"https://api.github.com/users/swift-nav/events{/privacy}","received_events_url":"https://api.github.com/users/swift-nav/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swift-nav/plover","description":"Plover is a language for matrix algebra on embedded systems.","fork":false,"url":"https://api.github.com/repos/swift-nav/plover","forks_url":"https://api.github.com/repos/swift-nav/plover/forks","keys_url":"https://api.github.com/repos/swift-nav/plover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swift-nav/plover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swift-nav/plover/teams","hooks_url":"https://api.github.com/repos/swift-nav/plover/hooks","issue_events_url":"https://api.github.com/repos/swift-nav/plover/issues/events{/number}","events_url":"https://api.github.com/repos/swift-nav/plover/events","assignees_url":"https://api.github.com/repos/swift-nav/plover/assignees{/user}","branches_url":"https://api.github.com/repos/swift-nav/plover/branches{/branch}","tags_url":"https://api.github.com/repos/swift-nav/plover/tags","blobs_url":"https://api.github.com/repos/swift-nav/plover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swift-nav/plover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swift-nav/plover/git/refs{/sha}","trees_url":"https://api.github.com/repos/swift-nav/plover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swift-nav/plover/statuses/{sha}","languages_url":"https://api.github.com/repos/swift-nav/plover/languages","stargazers_url":"https://api.github.com/repos/swift-nav/plover/stargazers","contributors_url":"https://api.github.com/repos/swift-nav/plover/contributors","subscribers_url":"https://api.github.com/repos/swift-nav/plover/subscribers","subscription_url":"https://api.github.com/repos/swift-nav/plover/subscription","commits_url":"https://api.github.com/repos/swift-nav/plover/commits{/sha}","git_commits_url":"https://api.github.com/repos/swift-nav/plover/git/commits{/sha}","comments_url":"https://api.github.com/repos/swift-nav/plover/comments{/number}","issue_comment_url":"https://api.github.com/repos/swift-nav/plover/issues/comments{/number}","contents_url":"https://api.github.com/repos/swift-nav/plover/contents/{+path}","compare_url":"https://api.github.com/repos/swift-nav/plover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swift-nav/plover/merges","archive_url":"https://api.github.com/repos/swift-nav/plover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swift-nav/plover/downloads","issues_url":"https://api.github.com/repos/swift-nav/plover/issues{/number}","pulls_url":"https://api.github.com/repos/swift-nav/plover/pulls{/number}","milestones_url":"https://api.github.com/repos/swift-nav/plover/milestones{/number}","notifications_url":"https://api.github.com/repos/swift-nav/plover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swift-nav/plover/labels{/name}","releases_url":"https://api.github.com/repos/swift-nav/plover/releases{/id}","deployments_url":"https://api.github.com/repos/swift-nav/plover/deployments","created_at":"2014-10-20T16:38:32Z","updated_at":"2016-05-11T13:20:08Z","pushed_at":"2016-05-30T11:05:54Z","git_url":"git://github.com/swift-nav/plover.git","ssh_url":"git@github.com:swift-nav/plover.git","clone_url":"https://github.com/swift-nav/plover.git","svn_url":"https://github.com/swift-nav/plover","homepage":"http://swift-nav.github.io/plover","size":770,"stargazers_count":35,"watchers_count":35,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":20,"forks":13,"open_issues":20,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/53"},"html":{"href":"https://github.com/swift-nav/plover/pull/53"},"issue":{"href":"https://api.github.com/repos/swift-nav/plover/issues/53"},"comments":{"href":"https://api.github.com/repos/swift-nav/plover/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swift-nav/plover/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/swift-nav/plover/statuses/c4da23df51e67cbe4c0a8dca14d587831e549fe0"}}}}
{"actor":{"display_login":"scottswift"}}