{"action":"created","comment":{"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments/38636132","id":38636132,"diff_hunk":"@@ -1107,4 +1116,47 @@ public boolean isDetailedNationalIDBuiltAndReady(int nationalID){\n         return detailedPokemonShortList!=null && detailedPokemonShortList[nationalID]!=null;\n     }\n \n+    /**\n+     * Constructs a sparse matrix of the type effectivenesses.\n+     *\n+     * This should be done on initiation of the {@link PokemonFactory}\n+     *\n+     * @return sparse matrix of the types effectiveness against each other\n+     */\n+    private double[][] buildTypeEffectivenessTable() {\n+        int maxTypeID = getMaxTypeID();\n+        double[][] typeEffectiveness = new double[maxTypeID][maxTypeID];\n+\n+        for (int i = 0; i < maxTypeID; i++) {\n+            for (int j = 0; j < maxTypeID; j++) {\n+                String[] selectionArg = {String.valueOf(i + 1), String.valueOf(j + 1)};\n+                Cursor cursor = database.query(TYPE_EFFECTIVENESS_TABLE, null, FROM_TYPE_ID + \"=?\"","path":"app/src/main/java/me/quadphase/qpdex/databaseAccess/PokemonFactory.java","position":45,"original_position":45,"commit_id":"41ae95de4711b4d8caa32bc42dfa4868d978f504","original_commit_id":"41ae95de4711b4d8caa32bc42dfa4868d978f504","user":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"body":"This is O(n^2) time due to double for-loops above. Consider restructuring this query so that you load the entire table into memory and then format it into the Sparse Array.","created_at":"2015-09-03T11:39:12Z","updated_at":"2015-09-03T11:39:12Z","html_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/39#discussion_r38636132","pull_request_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments/38636132"},"html":{"href":"https://github.com/foxtrot94/ECE-Pokedex/pull/39#discussion_r38636132"},"pull_request":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39","id":43943529,"html_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/39","diff_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/39.diff","patch_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/39.patch","issue_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/39","number":39,"state":"open","locked":false,"title":"Issue#33 types","user":{"login":"minicole","id":6855705,"avatar_url":"https://avatars.githubusercontent.com/u/6855705?v=3","gravatar_id":"","url":"https://api.github.com/users/minicole","html_url":"https://github.com/minicole","followers_url":"https://api.github.com/users/minicole/followers","following_url":"https://api.github.com/users/minicole/following{/other_user}","gists_url":"https://api.github.com/users/minicole/gists{/gist_id}","starred_url":"https://api.github.com/users/minicole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minicole/subscriptions","organizations_url":"https://api.github.com/users/minicole/orgs","repos_url":"https://api.github.com/users/minicole/repos","events_url":"https://api.github.com/users/minicole/events{/privacy}","received_events_url":"https://api.github.com/users/minicole/received_events","type":"User","site_admin":false},"body":"Issue #33 \r\n\r\nGives functionality to type effectivenesses.\r\n\r\n![device-2015-09-01-204642](https://cloud.githubusercontent.com/assets/6855705/9620641/9b447678-50ea-11e5-8da4-28a7d2a44f20.png)\r\n","created_at":"2015-09-02T00:47:11Z","updated_at":"2015-09-03T11:39:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dbe1c95c5a28a287f1eb49f3dc2124cb591f7a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39/commits","review_comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39/comments","review_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/39/comments","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/41ae95de4711b4d8caa32bc42dfa4868d978f504","head":{"label":"foxtrot94:issue#33-types","ref":"issue#33-types","sha":"41ae95de4711b4d8caa32bc42dfa4868d978f504","user":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"repo":{"id":31136701,"name":"ECE-Pokedex","full_name":"foxtrot94/ECE-Pokedex","owner":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxtrot94/ECE-Pokedex","description":"An Android App for those that want to be the very best! You Gotta Catch 'Em All!","fork":false,"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex","forks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/forks","keys_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/teams","hooks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/hooks","issue_events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/events{/number}","events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/events","assignees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/assignees{/user}","branches_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/branches{/branch}","tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/tags","blobs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/{sha}","languages_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/languages","stargazers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/stargazers","contributors_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contributors","subscribers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscribers","subscription_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscription","commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contents/{+path}","compare_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/merges","archive_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/downloads","issues_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues{/number}","pulls_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls{/number}","milestones_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/milestones{/number}","notifications_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/labels{/name}","releases_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/releases{/id}","created_at":"2015-02-21T18:57:28Z","updated_at":"2015-09-01T15:27:54Z","pushed_at":"2015-09-03T11:00:18Z","git_url":"git://github.com/foxtrot94/ECE-Pokedex.git","ssh_url":"git@github.com:foxtrot94/ECE-Pokedex.git","clone_url":"https://github.com/foxtrot94/ECE-Pokedex.git","svn_url":"https://github.com/foxtrot94/ECE-Pokedex","homepage":"","size":79212,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"foxtrot94:master","ref":"master","sha":"3415f8d7766e826d78d07c01fde3bc5b3efd5c4f","user":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"repo":{"id":31136701,"name":"ECE-Pokedex","full_name":"foxtrot94/ECE-Pokedex","owner":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxtrot94/ECE-Pokedex","description":"An Android App for those that want to be the very best! You Gotta Catch 'Em All!","fork":false,"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex","forks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/forks","keys_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/teams","hooks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/hooks","issue_events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/events{/number}","events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/events","assignees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/assignees{/user}","branches_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/branches{/branch}","tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/tags","blobs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/{sha}","languages_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/languages","stargazers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/stargazers","contributors_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contributors","subscribers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscribers","subscription_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscription","commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contents/{+path}","compare_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/merges","archive_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/downloads","issues_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues{/number}","pulls_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls{/number}","milestones_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/milestones{/number}","notifications_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/labels{/name}","releases_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/releases{/id}","created_at":"2015-02-21T18:57:28Z","updated_at":"2015-09-01T15:27:54Z","pushed_at":"2015-09-03T11:00:18Z","git_url":"git://github.com/foxtrot94/ECE-Pokedex.git","ssh_url":"git@github.com:foxtrot94/ECE-Pokedex.git","clone_url":"https://github.com/foxtrot94/ECE-Pokedex.git","svn_url":"https://github.com/foxtrot94/ECE-Pokedex","homepage":"","size":79212,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39"},"html":{"href":"https://github.com/foxtrot94/ECE-Pokedex/pull/39"},"issue":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/39"},"comments":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/41ae95de4711b4d8caa32bc42dfa4868d978f504"}}}}