{"action":"created","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/462","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/462/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/462/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/462/events","html_url":"https://github.com/mlpack/mlpack/pull/462","id":111994379,"number":462,"title":"fix constructor bug(oivs_init.hpp)","user":{"login":"stereomatchingkiss","id":1801914,"avatar_url":"https://avatars.githubusercontent.com/u/1801914?v=3","gravatar_id":"","url":"https://api.github.com/users/stereomatchingkiss","html_url":"https://github.com/stereomatchingkiss","followers_url":"https://api.github.com/users/stereomatchingkiss/followers","following_url":"https://api.github.com/users/stereomatchingkiss/following{/other_user}","gists_url":"https://api.github.com/users/stereomatchingkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/stereomatchingkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereomatchingkiss/subscriptions","organizations_url":"https://api.github.com/users/stereomatchingkiss/orgs","repos_url":"https://api.github.com/users/stereomatchingkiss/repos","events_url":"https://api.github.com/users/stereomatchingkiss/events{/privacy}","received_events_url":"https://api.github.com/users/stereomatchingkiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-18T01:37:03Z","updated_at":"2015-10-18T19:19:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/462","html_url":"https://github.com/mlpack/mlpack/pull/462","diff_url":"https://github.com/mlpack/mlpack/pull/462.diff","patch_url":"https://github.com/mlpack/mlpack/pull/462.patch"},"body":"fix bugs\r\n\r\n1 : Forgot to define the data member \"epsilon\"\r\n2 : The data member \"b\" should initialize at initialization list"},"comment":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/comments/149040186","html_url":"https://github.com/mlpack/mlpack/pull/462#issuecomment-149040186","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/462","id":149040186,"user":{"login":"stereomatchingkiss","id":1801914,"avatar_url":"https://avatars.githubusercontent.com/u/1801914?v=3","gravatar_id":"","url":"https://api.github.com/users/stereomatchingkiss","html_url":"https://github.com/stereomatchingkiss","followers_url":"https://api.github.com/users/stereomatchingkiss/followers","following_url":"https://api.github.com/users/stereomatchingkiss/following{/other_user}","gists_url":"https://api.github.com/users/stereomatchingkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/stereomatchingkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereomatchingkiss/subscriptions","organizations_url":"https://api.github.com/users/stereomatchingkiss/orgs","repos_url":"https://api.github.com/users/stereomatchingkiss/repos","events_url":"https://api.github.com/users/stereomatchingkiss/events{/privacy}","received_events_url":"https://api.github.com/users/stereomatchingkiss/received_events","type":"User","site_admin":false},"created_at":"2015-10-18T19:19:37Z","updated_at":"2015-10-18T19:19:37Z","body":">It's only needed in the constructor\r\n\r\nepsilon is my mistake, I did not check the codes carefully.The original codes try to initialize \"non-existent epsilon\", so the compilation can not pass\r\n\r\n>I avoided the initialization list in favor of readability\r\n\r\nIn this case, you have to declare b as non-const, because const data member must be initialize through the initialization list, else the compilation will fail.I am favor readability too:), maintainability \r\nis very important for long term development, In my humble opinion, codes quality of mlpack are quite well. \r\n\r\n>but maybe it doesn't make a huge difference\r\n\r\nI think this is based on the taste of the programmers, if the initialization process is too complex, we could hide it in data member.\r\n\r\nBy the way, is it ok to change the parameters of Train to const(as the channel logs of 18/20/2015 suggest)?Thanks"}}