{"action":"created","comment":{"url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/comments/80396842","id":80396842,"diff_hunk":"@@ -18,46 +19,147 @@\n public class AdjacencyList implements Representation {\n     private Map<Node, Collection<Edge>> adjacencyList;\n \n-    public AdjacencyList(File file) {\n+    public AdjacencyList(File file)\n+    {\n+        try {\n+            adjacencyList = new HashMap<Node, Collection<Edge>>();\n+            BufferedReader br = new BufferedReader(new FileReader(file));\n+            String line = br.readLine();\n+            int count = Integer.parseInt(line);\n+            for (int i = 0; i < count; i++) {\n+                adjacencyList.put(new Node(i), new ArrayList<Edge>());\n+            }\n+            line = br.readLine();\n+            while (line != null) {\n+                String[] data = line.split(\":\");\n+                int[] idata = new int[data.length];\n+                for (int j = 0; j < data.length; j++) {\n+                    idata[j] = Integer.parseInt(data[j]);\n+                }\n+                ArrayList<Edge> temp = (ArrayList<Edge>) adjacencyList.get(new Node(idata[0]));\n+                temp.add(new Edge(new Node(idata[0]), new Node(idata[1]), idata[2]));\n+                adjacencyList.put(new Node(idata[0]), temp);\n+                line = br.readLine();\n+            }\n+            br.close();\n+        }catch(IOException e){}","path":"src/main/java/csula/cs4660/graphs/representations/AdjacencyList.java","position":45,"original_position":45,"commit_id":"c066faaf4c90ceb7295df2d73de9cae9cf821b1e","original_commit_id":"c066faaf4c90ceb7295df2d73de9cae9cf821b1e","user":{"login":"rcliao","id":2566047,"avatar_url":"https://avatars.githubusercontent.com/u/2566047?v=3","gravatar_id":"","url":"https://api.github.com/users/rcliao","html_url":"https://github.com/rcliao","followers_url":"https://api.github.com/users/rcliao/followers","following_url":"https://api.github.com/users/rcliao/following{/other_user}","gists_url":"https://api.github.com/users/rcliao/gists{/gist_id}","starred_url":"https://api.github.com/users/rcliao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcliao/subscriptions","organizations_url":"https://api.github.com/users/rcliao/orgs","repos_url":"https://api.github.com/users/rcliao/repos","events_url":"https://api.github.com/users/rcliao/events{/privacy}","received_events_url":"https://api.github.com/users/rcliao/received_events","type":"User","site_admin":false},"body":"should probably at least do e.printStackTrace();","created_at":"2016-09-26T00:50:34Z","updated_at":"2016-09-26T00:50:34Z","html_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1#discussion_r80396842","pull_request_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/comments/80396842"},"html":{"href":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1#discussion_r80396842"},"pull_request":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1","id":85698088,"html_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1","diff_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1.diff","patch_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1.patch","issue_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/1","number":1,"state":"closed","locked":false,"title":"Homework 1 complete","user":{"login":"EvanChiang","id":16892734,"avatar_url":"https://avatars.githubusercontent.com/u/16892734?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanChiang","html_url":"https://github.com/EvanChiang","followers_url":"https://api.github.com/users/EvanChiang/followers","following_url":"https://api.github.com/users/EvanChiang/following{/other_user}","gists_url":"https://api.github.com/users/EvanChiang/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanChiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanChiang/subscriptions","organizations_url":"https://api.github.com/users/EvanChiang/orgs","repos_url":"https://api.github.com/users/EvanChiang/repos","events_url":"https://api.github.com/users/EvanChiang/events{/privacy}","received_events_url":"https://api.github.com/users/EvanChiang/received_events","type":"User","site_admin":false},"body":"Adjacency List\r\nAdjacent - O(n)\r\nNeighbors - O(n)\r\naddNode - O(n)\r\nremoveNode - O(n^2)\r\naddEdge - O(n)\r\nremoveEdge - O(n)\r\nDistance - O(n)\r\n\r\nAdjacency Matrix\r\nAdjacent - O(n)\r\nNeighbors - O(n)\r\naddNode - O(n^2)\r\nremoveNode - O(n^2)\r\naddEdge - O(n)\r\nremoveEdge - O(n)\r\nDistance - O(n)\r\n\r\nObject Oriented\r\nAdjacent - O(n)\r\nNeighbors - O(n)\r\naddNode - O(n)\r\nremoveNode - O(n)\r\naddEdge - O(n)\r\nremoveEdge - O(n)\r\nDistance - O(n)\r\n\r\n2. Performance measure - does this action/state move me closer to winning and away from losing?\r\nEnvironment - The board and game pieces.\r\nActuator - Making a move with a game piece.\r\nSensor - Looking at the board and seeing the state it is in.\r\n\r\n3. Initial state - starting board of chess. The pawns are positioned in the second row while each special piece is positioned accordingly.\r\nPossible action - Any legal move from any remaining piece on the board.\r\nTransition model - the current state after a possible action has been executed.\r\nGoal test - a test in which it checks to see if a current state is a checkmate.\r\nPath cost - the cost to move a piece is your turn.\r\n\r\n4. Fully observable - Can see entire board with no hidden elements.\r\nDeterministic - No random events.\r\nDiscrete - There is a finite amount of states that can be counted.\r\nBenign - The environment, your opponent, is trying to defeat you.\r\n","created_at":"2016-09-18T05:48:19Z","updated_at":"2016-09-26T00:52:17Z","closed_at":"2016-09-24T17:49:49Z","merged_at":"2016-09-24T17:49:49Z","merge_commit_sha":"be5ba61f948f8979f1a77e5e47944d7d18d3607f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1/commits","review_comments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1/comments","review_comment_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/1/comments","statuses_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/statuses/c066faaf4c90ceb7295df2d73de9cae9cf821b1e","head":{"label":"csula-students:homework1","ref":"homework1","sha":"c066faaf4c90ceb7295df2d73de9cae9cf821b1e","user":{"login":"csula-students","id":18237553,"avatar_url":"https://avatars.githubusercontent.com/u/18237553?v=3","gravatar_id":"","url":"https://api.github.com/users/csula-students","html_url":"https://github.com/csula-students","followers_url":"https://api.github.com/users/csula-students/followers","following_url":"https://api.github.com/users/csula-students/following{/other_user}","gists_url":"https://api.github.com/users/csula-students/gists{/gist_id}","starred_url":"https://api.github.com/users/csula-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csula-students/subscriptions","organizations_url":"https://api.github.com/users/csula-students/orgs","repos_url":"https://api.github.com/users/csula-students/repos","events_url":"https://api.github.com/users/csula-students/events{/privacy}","received_events_url":"https://api.github.com/users/csula-students/received_events","type":"Organization","site_admin":false},"repo":{"id":66723924,"name":"cs-4660-fall-homework-EvanChiang","full_name":"csula-students/cs-4660-fall-homework-EvanChiang","owner":{"login":"csula-students","id":18237553,"avatar_url":"https://avatars.githubusercontent.com/u/18237553?v=3","gravatar_id":"","url":"https://api.github.com/users/csula-students","html_url":"https://github.com/csula-students","followers_url":"https://api.github.com/users/csula-students/followers","following_url":"https://api.github.com/users/csula-students/following{/other_user}","gists_url":"https://api.github.com/users/csula-students/gists{/gist_id}","starred_url":"https://api.github.com/users/csula-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csula-students/subscriptions","organizations_url":"https://api.github.com/users/csula-students/orgs","repos_url":"https://api.github.com/users/csula-students/repos","events_url":"https://api.github.com/users/csula-students/events{/privacy}","received_events_url":"https://api.github.com/users/csula-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang","description":"cs-4660-fall-homework-EvanChiang created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang","forks_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/forks","keys_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/teams","hooks_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/hooks","issue_events_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/events{/number}","events_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/events","assignees_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/assignees{/user}","branches_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/branches{/branch}","tags_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/tags","blobs_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/refs{/sha}","trees_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/statuses/{sha}","languages_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/languages","stargazers_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/stargazers","contributors_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/contributors","subscribers_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/subscribers","subscription_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/subscription","commits_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/commits{/sha}","git_commits_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/commits{/sha}","comments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/comments{/number}","issue_comment_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/comments{/number}","contents_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/contents/{+path}","compare_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/merges","archive_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/downloads","issues_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues{/number}","pulls_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls{/number}","milestones_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/milestones{/number}","notifications_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/labels{/name}","releases_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/releases{/id}","deployments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/deployments","created_at":"2016-08-27T16:22:55Z","updated_at":"2016-08-27T18:21:49Z","pushed_at":"2016-09-24T17:49:49Z","git_url":"git://github.com/csula-students/cs-4660-fall-homework-EvanChiang.git","ssh_url":"git@github.com:csula-students/cs-4660-fall-homework-EvanChiang.git","clone_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang.git","svn_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang","homepage":null,"size":565,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"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":0,"default_branch":"master"}},"base":{"label":"csula-students:master","ref":"master","sha":"7eb841e6d38a4aef90ca9998c4f63d8e09738e1e","user":{"login":"csula-students","id":18237553,"avatar_url":"https://avatars.githubusercontent.com/u/18237553?v=3","gravatar_id":"","url":"https://api.github.com/users/csula-students","html_url":"https://github.com/csula-students","followers_url":"https://api.github.com/users/csula-students/followers","following_url":"https://api.github.com/users/csula-students/following{/other_user}","gists_url":"https://api.github.com/users/csula-students/gists{/gist_id}","starred_url":"https://api.github.com/users/csula-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csula-students/subscriptions","organizations_url":"https://api.github.com/users/csula-students/orgs","repos_url":"https://api.github.com/users/csula-students/repos","events_url":"https://api.github.com/users/csula-students/events{/privacy}","received_events_url":"https://api.github.com/users/csula-students/received_events","type":"Organization","site_admin":false},"repo":{"id":66723924,"name":"cs-4660-fall-homework-EvanChiang","full_name":"csula-students/cs-4660-fall-homework-EvanChiang","owner":{"login":"csula-students","id":18237553,"avatar_url":"https://avatars.githubusercontent.com/u/18237553?v=3","gravatar_id":"","url":"https://api.github.com/users/csula-students","html_url":"https://github.com/csula-students","followers_url":"https://api.github.com/users/csula-students/followers","following_url":"https://api.github.com/users/csula-students/following{/other_user}","gists_url":"https://api.github.com/users/csula-students/gists{/gist_id}","starred_url":"https://api.github.com/users/csula-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csula-students/subscriptions","organizations_url":"https://api.github.com/users/csula-students/orgs","repos_url":"https://api.github.com/users/csula-students/repos","events_url":"https://api.github.com/users/csula-students/events{/privacy}","received_events_url":"https://api.github.com/users/csula-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang","description":"cs-4660-fall-homework-EvanChiang created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang","forks_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/forks","keys_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/teams","hooks_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/hooks","issue_events_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/events{/number}","events_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/events","assignees_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/assignees{/user}","branches_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/branches{/branch}","tags_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/tags","blobs_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/refs{/sha}","trees_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/statuses/{sha}","languages_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/languages","stargazers_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/stargazers","contributors_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/contributors","subscribers_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/subscribers","subscription_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/subscription","commits_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/commits{/sha}","git_commits_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/git/commits{/sha}","comments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/comments{/number}","issue_comment_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/comments{/number}","contents_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/contents/{+path}","compare_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/merges","archive_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/downloads","issues_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues{/number}","pulls_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls{/number}","milestones_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/milestones{/number}","notifications_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/labels{/name}","releases_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/releases{/id}","deployments_url":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/deployments","created_at":"2016-08-27T16:22:55Z","updated_at":"2016-08-27T18:21:49Z","pushed_at":"2016-09-24T17:49:49Z","git_url":"git://github.com/csula-students/cs-4660-fall-homework-EvanChiang.git","ssh_url":"git@github.com:csula-students/cs-4660-fall-homework-EvanChiang.git","clone_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang.git","svn_url":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang","homepage":null,"size":565,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1"},"html":{"href":"https://github.com/csula-students/cs-4660-fall-homework-EvanChiang/pull/1"},"issue":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/1"},"comments":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/csula-students/cs-4660-fall-homework-EvanChiang/statuses/c066faaf4c90ceb7295df2d73de9cae9cf821b1e"}}}}
{"actor":{"display_login":"rcliao"}}