{"action":"created","issue":{"url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/50","repository_url":"https://api.github.com/repos/richelbilderbeek/pbdmms","labels_url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/50/comments","events_url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/50/events","html_url":"https://github.com/richelbilderbeek/pbdmms/issues/50","id":190565202,"number":50,"title":"Create a templated experiment","user":{"login":"richelbilderbeek","id":2098230,"avatar_url":"https://avatars.githubusercontent.com/u/2098230?v=3","gravatar_id":"","url":"https://api.github.com/users/richelbilderbeek","html_url":"https://github.com/richelbilderbeek","followers_url":"https://api.github.com/users/richelbilderbeek/followers","following_url":"https://api.github.com/users/richelbilderbeek/following{/other_user}","gists_url":"https://api.github.com/users/richelbilderbeek/gists{/gist_id}","starred_url":"https://api.github.com/users/richelbilderbeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richelbilderbeek/subscriptions","organizations_url":"https://api.github.com/users/richelbilderbeek/orgs","repos_url":"https://api.github.com/users/richelbilderbeek/repos","events_url":"https://api.github.com/users/richelbilderbeek/events{/privacy}","received_events_url":"https://api.github.com/users/richelbilderbeek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-20T15:44:19Z","updated_at":"2016-11-23T12:39:53Z","closed_at":null,"body":"To ensure that we all do our experiment in the same way, a template function should be written, ensuring we do things in the same way.\r\n\r\nThis must be done by the team as a whole. I suggest I write a first draft, then let the team modify."},"comment":{"url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/comments/262502709","html_url":"https://github.com/richelbilderbeek/pbdmms/issues/50#issuecomment-262502709","issue_url":"https://api.github.com/repos/richelbilderbeek/pbdmms/issues/50","id":262502709,"user":{"login":"richelbilderbeek","id":2098230,"avatar_url":"https://avatars.githubusercontent.com/u/2098230?v=3","gravatar_id":"","url":"https://api.github.com/users/richelbilderbeek","html_url":"https://github.com/richelbilderbeek","followers_url":"https://api.github.com/users/richelbilderbeek/followers","following_url":"https://api.github.com/users/richelbilderbeek/following{/other_user}","gists_url":"https://api.github.com/users/richelbilderbeek/gists{/gist_id}","starred_url":"https://api.github.com/users/richelbilderbeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richelbilderbeek/subscriptions","organizations_url":"https://api.github.com/users/richelbilderbeek/orgs","repos_url":"https://api.github.com/users/richelbilderbeek/repos","events_url":"https://api.github.com/users/richelbilderbeek/events{/privacy}","received_events_url":"https://api.github.com/users/richelbilderbeek/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T12:39:53Z","updated_at":"2016-11-23T12:39:53Z","body":"I suggest from \r\n\r\n```\r\ntemplate <class parameters, class simulation, class results>\r\nvoid do_experiment(const parameters& p)\r\n{\r\n  simulation s = create_simulation(p);\r\n  run(s);\r\n  save_ltt_plot(get_results(s), get_ltt_plot_filename(p));\r\n}\r\n```\r\n\r\nto \r\n\r\n```\r\ntemplate <class parameters, class simulation, class results>\r\nvoid do_experiment(const parameters& p)\r\n{\r\n  simulation s = create_simulation(p);\r\n  const int n_generations = get_n_generations(p);\r\n  for (int t=0; t!=n_generations; ++t)\r\n  {\r\n    const auto next_population = create_next_population(s);\r\n    set_population(s, next_population);\r\n  }\r\n  save_ltt_plot(get_results(s), get_ltt_plot_filename(p));\r\n}\r\n```\r\n\r\nSure, the get/set can be done in one line, but, thanks to `auto`, the rigidity of the function would not change from that.\r\n\r\nAgree on this?\r\n\r\n * [ ] @JorikdeBoer \r\n * [ ] @Lumphie \r\n * [x] @richelbilderbeek\r\n"}}
{"actor":{"display_login":"richelbilderbeek"}}