{"action":"opened","number":146,"pull_request":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146","id":92014425,"html_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/146","diff_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/146.diff","patch_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/146.patch","issue_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/146","number":146,"state":"open","locked":false,"title":"ENH: added iterators for MarkovChain simulation","user":{"login":"spencerlyon2","id":1001948,"avatar_url":"https://avatars.githubusercontent.com/u/1001948?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerlyon2","html_url":"https://github.com/spencerlyon2","followers_url":"https://api.github.com/users/spencerlyon2/followers","following_url":"https://api.github.com/users/spencerlyon2/following{/other_user}","gists_url":"https://api.github.com/users/spencerlyon2/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerlyon2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerlyon2/subscriptions","organizations_url":"https://api.github.com/users/spencerlyon2/orgs","repos_url":"https://api.github.com/users/spencerlyon2/repos","events_url":"https://api.github.com/users/spencerlyon2/events{/privacy}","received_events_url":"https://api.github.com/users/spencerlyon2/received_events","type":"User","site_admin":false},"body":"This PR revamps the internals behind `simulate` and `simulate_indices` to use the Julia iterator protocol.\r\n\r\nThe current API for `simulate`, `simulate!`, `simulate_indices`, `simulate_indices!` has not changed. \r\n\r\nHowever, we can now do things more flexibly.  I have defined two new types `MCIndSimulator` and `MCSimulator` that are responsible for _iterating_ over the simulation of a MarkovChain. This enables us to do things like\r\n\r\n```julia\r\nmcs = MCSimulator(mc, 200, 1)\r\n\r\n# get multiple simulations, using same initial condition\r\nsim1 = collect(mcs)\r\nsim2 = collect(mcs)\r\n\r\n# iterate over a simulation path, without creating array to hold path\r\nfor i in mcs\r\n    do_something_cool(i)\r\nend\r\n```\r\n\r\nYou can see the new (and greatly simplified!!) implementation of `simulate!` and `simulate_indices!` for other ideas about what is possible.","created_at":"2016-11-02T17:11:51Z","updated_at":"2016-11-02T17:11:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146/commits","review_comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146/comments","review_comment_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/146/comments","statuses_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/statuses/35032ea331c1208079a871f083fff419426f60df","head":{"label":"QuantEcon:sl/mc_iterators","ref":"sl/mc_iterators","sha":"35032ea331c1208079a871f083fff419426f60df","user":{"login":"QuantEcon","id":8703060,"avatar_url":"https://avatars.githubusercontent.com/u/8703060?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantEcon","html_url":"https://github.com/QuantEcon","followers_url":"https://api.github.com/users/QuantEcon/followers","following_url":"https://api.github.com/users/QuantEcon/following{/other_user}","gists_url":"https://api.github.com/users/QuantEcon/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantEcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantEcon/subscriptions","organizations_url":"https://api.github.com/users/QuantEcon/orgs","repos_url":"https://api.github.com/users/QuantEcon/repos","events_url":"https://api.github.com/users/QuantEcon/events{/privacy}","received_events_url":"https://api.github.com/users/QuantEcon/received_events","type":"Organization","site_admin":false},"repo":{"id":21705573,"name":"QuantEcon.jl","full_name":"QuantEcon/QuantEcon.jl","owner":{"login":"QuantEcon","id":8703060,"avatar_url":"https://avatars.githubusercontent.com/u/8703060?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantEcon","html_url":"https://github.com/QuantEcon","followers_url":"https://api.github.com/users/QuantEcon/followers","following_url":"https://api.github.com/users/QuantEcon/following{/other_user}","gists_url":"https://api.github.com/users/QuantEcon/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantEcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantEcon/subscriptions","organizations_url":"https://api.github.com/users/QuantEcon/orgs","repos_url":"https://api.github.com/users/QuantEcon/repos","events_url":"https://api.github.com/users/QuantEcon/events{/privacy}","received_events_url":"https://api.github.com/users/QuantEcon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantEcon/QuantEcon.jl","description":"Julia implementation of QuantEcon routines","fork":false,"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl","forks_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/forks","keys_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/teams","hooks_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/hooks","issue_events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/events{/number}","events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/events","assignees_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/assignees{/user}","branches_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/branches{/branch}","tags_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/tags","blobs_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/languages","stargazers_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/stargazers","contributors_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/contributors","subscribers_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/subscribers","subscription_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/subscription","commits_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/contents/{+path}","compare_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/merges","archive_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/downloads","issues_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues{/number}","pulls_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/labels{/name}","releases_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/releases{/id}","deployments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/deployments","created_at":"2014-07-10T18:30:31Z","updated_at":"2016-10-29T15:06:24Z","pushed_at":"2016-11-02T17:11:51Z","git_url":"git://github.com/QuantEcon/QuantEcon.jl.git","ssh_url":"git@github.com:QuantEcon/QuantEcon.jl.git","clone_url":"https://github.com/QuantEcon/QuantEcon.jl.git","svn_url":"https://github.com/QuantEcon/QuantEcon.jl","homepage":"http://quantecon.org/julia_index.html","size":25077,"stargazers_count":115,"watchers_count":115,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":125,"mirror_url":null,"open_issues_count":25,"forks":125,"open_issues":25,"watchers":115,"default_branch":"master"}},"base":{"label":"QuantEcon:master","ref":"master","sha":"3aeaf094def0506d4e796feedabf86306091aff6","user":{"login":"QuantEcon","id":8703060,"avatar_url":"https://avatars.githubusercontent.com/u/8703060?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantEcon","html_url":"https://github.com/QuantEcon","followers_url":"https://api.github.com/users/QuantEcon/followers","following_url":"https://api.github.com/users/QuantEcon/following{/other_user}","gists_url":"https://api.github.com/users/QuantEcon/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantEcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantEcon/subscriptions","organizations_url":"https://api.github.com/users/QuantEcon/orgs","repos_url":"https://api.github.com/users/QuantEcon/repos","events_url":"https://api.github.com/users/QuantEcon/events{/privacy}","received_events_url":"https://api.github.com/users/QuantEcon/received_events","type":"Organization","site_admin":false},"repo":{"id":21705573,"name":"QuantEcon.jl","full_name":"QuantEcon/QuantEcon.jl","owner":{"login":"QuantEcon","id":8703060,"avatar_url":"https://avatars.githubusercontent.com/u/8703060?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantEcon","html_url":"https://github.com/QuantEcon","followers_url":"https://api.github.com/users/QuantEcon/followers","following_url":"https://api.github.com/users/QuantEcon/following{/other_user}","gists_url":"https://api.github.com/users/QuantEcon/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantEcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantEcon/subscriptions","organizations_url":"https://api.github.com/users/QuantEcon/orgs","repos_url":"https://api.github.com/users/QuantEcon/repos","events_url":"https://api.github.com/users/QuantEcon/events{/privacy}","received_events_url":"https://api.github.com/users/QuantEcon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantEcon/QuantEcon.jl","description":"Julia implementation of QuantEcon routines","fork":false,"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl","forks_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/forks","keys_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/teams","hooks_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/hooks","issue_events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/events{/number}","events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/events","assignees_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/assignees{/user}","branches_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/branches{/branch}","tags_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/tags","blobs_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/languages","stargazers_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/stargazers","contributors_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/contributors","subscribers_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/subscribers","subscription_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/subscription","commits_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/contents/{+path}","compare_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/merges","archive_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/downloads","issues_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues{/number}","pulls_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/labels{/name}","releases_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/releases{/id}","deployments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/deployments","created_at":"2014-07-10T18:30:31Z","updated_at":"2016-10-29T15:06:24Z","pushed_at":"2016-11-02T17:11:51Z","git_url":"git://github.com/QuantEcon/QuantEcon.jl.git","ssh_url":"git@github.com:QuantEcon/QuantEcon.jl.git","clone_url":"https://github.com/QuantEcon/QuantEcon.jl.git","svn_url":"https://github.com/QuantEcon/QuantEcon.jl","homepage":"http://quantecon.org/julia_index.html","size":25077,"stargazers_count":115,"watchers_count":115,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":125,"mirror_url":null,"open_issues_count":25,"forks":125,"open_issues":25,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146"},"html":{"href":"https://github.com/QuantEcon/QuantEcon.jl/pull/146"},"issue":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/146"},"comments":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/statuses/35032ea331c1208079a871f083fff419426f60df"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":120,"deletions":70,"changed_files":3}}
{"actor":{"display_login":"spencerlyon2"}}