{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/matrix/pulls/comments/23047556","id":23047556,"diff_hunk":"@@ -798,22 +800,23 @@ func hqr2(d, e []float64, hess, v *Dense, epsilon float64) {\n \t}\n }\n \n-// D returns the block diagonal eigenvalue matrix from the real and imaginary\n-// components d and e.\n-func (f EigenFactors) D() *Dense {\n-\td, e := f.d, f.e\n-\tvar n int\n-\tif n = len(d); n != len(e) {\n-\t\tpanic(ErrSquare)\n-\t}\n-\tdm := NewDense(n, n, nil)\n-\tfor i := 0; i < n; i++ {\n-\t\tdm.set(i, i, d[i])\n-\t\tif e[i] > 0 {\n-\t\t\tdm.set(i, i+1, e[i])\n-\t\t} else if e[i] < 0 {\n-\t\t\tdm.set(i, i-1, e[i])\n+type EigenValues []complex128\n+\n+// D returns the eigenvalue matrix from the real and imaginary components\n+// of the eigenvalues.\n+//\n+// If the decomposed matrix is not symmetric, then D returns a block diagonal\n+// matrix with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues,\n+// lambda + i*mu, in 2-by-2 blocks, [lambda, mu; -mu, lambda].\n+func (v EigenValues) D() *Dense {","path":"mat64/eigen.go","position":64,"original_position":64,"commit_id":"13bedbb4667b2f7148efa05310cd9fa675730e1b","original_commit_id":"4d6264fd5c3b733b03270aeed544e54114b85162","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"I use octave, so that might explain the difference.\r\n\r\n>The bigger issue is that the mat64 eigenvectors are not orthonormal, and not only that, appear to not even be eigenvalues\r\n\r\nYes, that is the issue that I am trying to sort out.","created_at":"2015-01-15T22:01:35Z","updated_at":"2015-01-15T22:01:35Z","html_url":"https://github.com/gonum/matrix/pull/83#discussion_r23047556","pull_request_url":"https://api.github.com/repos/gonum/matrix/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/gonum/matrix/pulls/comments/23047556"},"html":{"href":"https://github.com/gonum/matrix/pull/83#discussion_r23047556"},"pull_request":{"href":"https://api.github.com/repos/gonum/matrix/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/matrix/pulls/83","id":27326054,"html_url":"https://github.com/gonum/matrix/pull/83","diff_url":"https://github.com/gonum/matrix/pull/83.diff","patch_url":"https://github.com/gonum/matrix/pull/83.patch","issue_url":"https://api.github.com/repos/gonum/matrix/issues/83","number":83,"state":"open","locked":false,"title":"Revise Eigen design","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"This is a minimally invasive change that exposes the eigenvalues while retaining the previous API.","created_at":"2015-01-14T04:18:41Z","updated_at":"2015-01-15T22:01:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"366dead3472ed6d67ffc62d7502e6d5d35c74d3b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/matrix/pulls/83/commits","review_comments_url":"https://api.github.com/repos/gonum/matrix/pulls/83/comments","review_comment_url":"https://api.github.com/repos/gonum/matrix/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gonum/matrix/issues/83/comments","statuses_url":"https://api.github.com/repos/gonum/matrix/statuses/13bedbb4667b2f7148efa05310cd9fa675730e1b","head":{"label":"gonum:eigen","ref":"eigen","sha":"13bedbb4667b2f7148efa05310cd9fa675730e1b","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":8569918,"name":"matrix","full_name":"gonum/matrix","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/matrix","description":"Scientific math package for the Go language.","fork":false,"url":"https://api.github.com/repos/gonum/matrix","forks_url":"https://api.github.com/repos/gonum/matrix/forks","keys_url":"https://api.github.com/repos/gonum/matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/matrix/teams","hooks_url":"https://api.github.com/repos/gonum/matrix/hooks","issue_events_url":"https://api.github.com/repos/gonum/matrix/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/matrix/events","assignees_url":"https://api.github.com/repos/gonum/matrix/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/matrix/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/matrix/tags","blobs_url":"https://api.github.com/repos/gonum/matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/matrix/languages","stargazers_url":"https://api.github.com/repos/gonum/matrix/stargazers","contributors_url":"https://api.github.com/repos/gonum/matrix/contributors","subscribers_url":"https://api.github.com/repos/gonum/matrix/subscribers","subscription_url":"https://api.github.com/repos/gonum/matrix/subscription","commits_url":"https://api.github.com/repos/gonum/matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/matrix/issues/comments/{number}","contents_url":"https://api.github.com/repos/gonum/matrix/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/matrix/merges","archive_url":"https://api.github.com/repos/gonum/matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/matrix/downloads","issues_url":"https://api.github.com/repos/gonum/matrix/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/matrix/labels{/name}","releases_url":"https://api.github.com/repos/gonum/matrix/releases{/id}","created_at":"2013-03-05T01:59:12Z","updated_at":"2015-01-15T06:29:30Z","pushed_at":"2015-01-15T19:45:25Z","git_url":"git://github.com/gonum/matrix.git","ssh_url":"git@github.com:gonum/matrix.git","clone_url":"https://github.com/gonum/matrix.git","svn_url":"https://github.com/gonum/matrix","homepage":null,"size":1915,"stargazers_count":77,"watchers_count":77,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":17,"forks":14,"open_issues":17,"watchers":77,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"fe769dd60a310ba17d29748c98eb02f5712a36de","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":8569918,"name":"matrix","full_name":"gonum/matrix","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/matrix","description":"Scientific math package for the Go language.","fork":false,"url":"https://api.github.com/repos/gonum/matrix","forks_url":"https://api.github.com/repos/gonum/matrix/forks","keys_url":"https://api.github.com/repos/gonum/matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/matrix/teams","hooks_url":"https://api.github.com/repos/gonum/matrix/hooks","issue_events_url":"https://api.github.com/repos/gonum/matrix/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/matrix/events","assignees_url":"https://api.github.com/repos/gonum/matrix/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/matrix/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/matrix/tags","blobs_url":"https://api.github.com/repos/gonum/matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/matrix/languages","stargazers_url":"https://api.github.com/repos/gonum/matrix/stargazers","contributors_url":"https://api.github.com/repos/gonum/matrix/contributors","subscribers_url":"https://api.github.com/repos/gonum/matrix/subscribers","subscription_url":"https://api.github.com/repos/gonum/matrix/subscription","commits_url":"https://api.github.com/repos/gonum/matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/matrix/issues/comments/{number}","contents_url":"https://api.github.com/repos/gonum/matrix/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/matrix/merges","archive_url":"https://api.github.com/repos/gonum/matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/matrix/downloads","issues_url":"https://api.github.com/repos/gonum/matrix/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/matrix/labels{/name}","releases_url":"https://api.github.com/repos/gonum/matrix/releases{/id}","created_at":"2013-03-05T01:59:12Z","updated_at":"2015-01-15T06:29:30Z","pushed_at":"2015-01-15T19:45:25Z","git_url":"git://github.com/gonum/matrix.git","ssh_url":"git@github.com:gonum/matrix.git","clone_url":"https://github.com/gonum/matrix.git","svn_url":"https://github.com/gonum/matrix","homepage":null,"size":1915,"stargazers_count":77,"watchers_count":77,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":17,"forks":14,"open_issues":17,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/matrix/pulls/83"},"html":{"href":"https://github.com/gonum/matrix/pull/83"},"issue":{"href":"https://api.github.com/repos/gonum/matrix/issues/83"},"comments":{"href":"https://api.github.com/repos/gonum/matrix/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/matrix/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/matrix/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gonum/matrix/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/matrix/statuses/13bedbb4667b2f7148efa05310cd9fa675730e1b"}}}}