{"action":"created","comment":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments/69288150","id":69288150,"diff_hunk":"@@ -278,6 +282,131 @@ class CSGObject\n \t */\n \tvoid build_gradient_parameter_dictionary(CMap<TParameter*, CSGObject*>* dict);\n \n+\t/** Checks if object has a parameter identified by a name.\n+\t *\n+\t * @param name name of the parameter\n+\t * @return true if the parameter exists with the input name\n+\t */\n+\tinline bool has(const std::string& name) const\n+\t{\n+\t\tBaseTag tag(name);\n+\t\treturn _has(tag);\n+\t}\n+\n+\t/** Checks if a parameter with a tag already exists.\n+\t *\n+\t * @param tag tag of the parameter containing name and type information\n+\t * @return true if the parameter exists with the input tag\n+\t */\n+\ttemplate <typename T>\n+\tinline bool has(const Tag<T>& tag) const\n+\t{\n+\t\treturn has<T>(tag.name());\n+\t}\n+\n+\t/** Checks if a type exists for a parameter identified by a name.\n+\t *\n+\t * @param name name of the parameter\n+\t * @param type type information for the parameter\n+\t * @return true if the parameter exists with the input name and type\n+\t */\n+\ttemplate <typename T, typename U=void>\n+\tinline bool has(const std::string& name) const\n+\t{\n+\t\tBaseTag tag(name);\n+\t\tif(!_has(tag))\n+\t\t\treturn false;\n+\t\tconst Any value = _get(tag);\n+\t\treturn value.sameType<T>();\n+\t}\n+\n+\t/** Sets a value for an allowed parameter which is identified by a tag.","path":"src/shogun/base/SGObject.h","position":59,"original_position":59,"commit_id":"c1fb5238155f91844bca1130c44d2a2074aa8eb5","original_commit_id":"c1fb5238155f91844bca1130c44d2a2074aa8eb5","user":{"login":"karlnapf","id":699071,"avatar_url":"https://avatars.githubusercontent.com/u/699071?v=3","gravatar_id":"","url":"https://api.github.com/users/karlnapf","html_url":"https://github.com/karlnapf","followers_url":"https://api.github.com/users/karlnapf/followers","following_url":"https://api.github.com/users/karlnapf/following{/other_user}","gists_url":"https://api.github.com/users/karlnapf/gists{/gist_id}","starred_url":"https://api.github.com/users/karlnapf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlnapf/subscriptions","organizations_url":"https://api.github.com/users/karlnapf/orgs","repos_url":"https://api.github.com/users/karlnapf/repos","events_url":"https://api.github.com/users/karlnapf/events{/privacy}","received_events_url":"https://api.github.com/users/karlnapf/received_events","type":"User","site_admin":false},"body":"Sets a value for an existing parameter which is identified by a tag.","created_at":"2016-07-01T11:53:13Z","updated_at":"2016-07-01T11:53:13Z","html_url":"https://github.com/shogun-toolbox/shogun/pull/3221#discussion_r69288150","pull_request_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221","_links":{"self":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments/69288150"},"html":{"href":"https://github.com/shogun-toolbox/shogun/pull/3221#discussion_r69288150"},"pull_request":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221"}}},"pull_request":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221","id":71807478,"html_url":"https://github.com/shogun-toolbox/shogun/pull/3221","diff_url":"https://github.com/shogun-toolbox/shogun/pull/3221.diff","patch_url":"https://github.com/shogun-toolbox/shogun/pull/3221.patch","issue_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3221","number":3221,"state":"open","locked":false,"title":"Implement tag-based parameters in SGObject","user":{"login":"sanuj","id":4343847,"avatar_url":"https://avatars.githubusercontent.com/u/4343847?v=3","gravatar_id":"","url":"https://api.github.com/users/sanuj","html_url":"https://github.com/sanuj","followers_url":"https://api.github.com/users/sanuj/followers","following_url":"https://api.github.com/users/sanuj/following{/other_user}","gists_url":"https://api.github.com/users/sanuj/gists{/gist_id}","starred_url":"https://api.github.com/users/sanuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanuj/subscriptions","organizations_url":"https://api.github.com/users/sanuj/orgs","repos_url":"https://api.github.com/users/sanuj/repos","events_url":"https://api.github.com/users/sanuj/events{/privacy}","received_events_url":"https://api.github.com/users/sanuj/received_events","type":"User","site_admin":false},"body":"Temporary PR for @lisitsyn.","created_at":"2016-05-28T17:34:15Z","updated_at":"2016-07-01T11:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ab59b827c45da6f8606126a765bc05f76dd6316","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221/commits","review_comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221/comments","review_comment_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3221/comments","statuses_url":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/c1fb5238155f91844bca1130c44d2a2074aa8eb5","head":{"label":"sanuj:tags","ref":"tags","sha":"c1fb5238155f91844bca1130c44d2a2074aa8eb5","user":{"login":"sanuj","id":4343847,"avatar_url":"https://avatars.githubusercontent.com/u/4343847?v=3","gravatar_id":"","url":"https://api.github.com/users/sanuj","html_url":"https://github.com/sanuj","followers_url":"https://api.github.com/users/sanuj/followers","following_url":"https://api.github.com/users/sanuj/following{/other_user}","gists_url":"https://api.github.com/users/sanuj/gists{/gist_id}","starred_url":"https://api.github.com/users/sanuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanuj/subscriptions","organizations_url":"https://api.github.com/users/sanuj/orgs","repos_url":"https://api.github.com/users/sanuj/repos","events_url":"https://api.github.com/users/sanuj/events{/privacy}","received_events_url":"https://api.github.com/users/sanuj/received_events","type":"User","site_admin":false},"repo":{"id":27362302,"name":"shogun","full_name":"sanuj/shogun","owner":{"login":"sanuj","id":4343847,"avatar_url":"https://avatars.githubusercontent.com/u/4343847?v=3","gravatar_id":"","url":"https://api.github.com/users/sanuj","html_url":"https://github.com/sanuj","followers_url":"https://api.github.com/users/sanuj/followers","following_url":"https://api.github.com/users/sanuj/following{/other_user}","gists_url":"https://api.github.com/users/sanuj/gists{/gist_id}","starred_url":"https://api.github.com/users/sanuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanuj/subscriptions","organizations_url":"https://api.github.com/users/sanuj/orgs","repos_url":"https://api.github.com/users/sanuj/repos","events_url":"https://api.github.com/users/sanuj/events{/privacy}","received_events_url":"https://api.github.com/users/sanuj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanuj/shogun","description":"The Shogun Machine Learning Toolbox (Source Code)","fork":true,"url":"https://api.github.com/repos/sanuj/shogun","forks_url":"https://api.github.com/repos/sanuj/shogun/forks","keys_url":"https://api.github.com/repos/sanuj/shogun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanuj/shogun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanuj/shogun/teams","hooks_url":"https://api.github.com/repos/sanuj/shogun/hooks","issue_events_url":"https://api.github.com/repos/sanuj/shogun/issues/events{/number}","events_url":"https://api.github.com/repos/sanuj/shogun/events","assignees_url":"https://api.github.com/repos/sanuj/shogun/assignees{/user}","branches_url":"https://api.github.com/repos/sanuj/shogun/branches{/branch}","tags_url":"https://api.github.com/repos/sanuj/shogun/tags","blobs_url":"https://api.github.com/repos/sanuj/shogun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanuj/shogun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanuj/shogun/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanuj/shogun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanuj/shogun/statuses/{sha}","languages_url":"https://api.github.com/repos/sanuj/shogun/languages","stargazers_url":"https://api.github.com/repos/sanuj/shogun/stargazers","contributors_url":"https://api.github.com/repos/sanuj/shogun/contributors","subscribers_url":"https://api.github.com/repos/sanuj/shogun/subscribers","subscription_url":"https://api.github.com/repos/sanuj/shogun/subscription","commits_url":"https://api.github.com/repos/sanuj/shogun/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanuj/shogun/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanuj/shogun/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanuj/shogun/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanuj/shogun/contents/{+path}","compare_url":"https://api.github.com/repos/sanuj/shogun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanuj/shogun/merges","archive_url":"https://api.github.com/repos/sanuj/shogun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanuj/shogun/downloads","issues_url":"https://api.github.com/repos/sanuj/shogun/issues{/number}","pulls_url":"https://api.github.com/repos/sanuj/shogun/pulls{/number}","milestones_url":"https://api.github.com/repos/sanuj/shogun/milestones{/number}","notifications_url":"https://api.github.com/repos/sanuj/shogun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanuj/shogun/labels{/name}","releases_url":"https://api.github.com/repos/sanuj/shogun/releases{/id}","deployments_url":"https://api.github.com/repos/sanuj/shogun/deployments","created_at":"2014-12-01T04:19:55Z","updated_at":"2016-02-21T03:45:13Z","pushed_at":"2016-06-30T18:04:38Z","git_url":"git://github.com/sanuj/shogun.git","ssh_url":"git@github.com:sanuj/shogun.git","clone_url":"https://github.com/sanuj/shogun.git","svn_url":"https://github.com/sanuj/shogun","homepage":"http://www.shogun-toolbox.org","size":60396,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"develop"}},"base":{"label":"shogun-toolbox:feature/tags","ref":"feature/tags","sha":"d33fbd93cd8d8fa93a82f02ebd3d0371f6188799","user":{"login":"shogun-toolbox","id":690673,"avatar_url":"https://avatars.githubusercontent.com/u/690673?v=3","gravatar_id":"","url":"https://api.github.com/users/shogun-toolbox","html_url":"https://github.com/shogun-toolbox","followers_url":"https://api.github.com/users/shogun-toolbox/followers","following_url":"https://api.github.com/users/shogun-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/shogun-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/shogun-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogun-toolbox/subscriptions","organizations_url":"https://api.github.com/users/shogun-toolbox/orgs","repos_url":"https://api.github.com/users/shogun-toolbox/repos","events_url":"https://api.github.com/users/shogun-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/shogun-toolbox/received_events","type":"Organization","site_admin":false},"repo":{"id":1555094,"name":"shogun","full_name":"shogun-toolbox/shogun","owner":{"login":"shogun-toolbox","id":690673,"avatar_url":"https://avatars.githubusercontent.com/u/690673?v=3","gravatar_id":"","url":"https://api.github.com/users/shogun-toolbox","html_url":"https://github.com/shogun-toolbox","followers_url":"https://api.github.com/users/shogun-toolbox/followers","following_url":"https://api.github.com/users/shogun-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/shogun-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/shogun-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogun-toolbox/subscriptions","organizations_url":"https://api.github.com/users/shogun-toolbox/orgs","repos_url":"https://api.github.com/users/shogun-toolbox/repos","events_url":"https://api.github.com/users/shogun-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/shogun-toolbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shogun-toolbox/shogun","description":"The Shogun Machine Learning Toolbox (Source Code)","fork":false,"url":"https://api.github.com/repos/shogun-toolbox/shogun","forks_url":"https://api.github.com/repos/shogun-toolbox/shogun/forks","keys_url":"https://api.github.com/repos/shogun-toolbox/shogun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shogun-toolbox/shogun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shogun-toolbox/shogun/teams","hooks_url":"https://api.github.com/repos/shogun-toolbox/shogun/hooks","issue_events_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/events{/number}","events_url":"https://api.github.com/repos/shogun-toolbox/shogun/events","assignees_url":"https://api.github.com/repos/shogun-toolbox/shogun/assignees{/user}","branches_url":"https://api.github.com/repos/shogun-toolbox/shogun/branches{/branch}","tags_url":"https://api.github.com/repos/shogun-toolbox/shogun/tags","blobs_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/refs{/sha}","trees_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/{sha}","languages_url":"https://api.github.com/repos/shogun-toolbox/shogun/languages","stargazers_url":"https://api.github.com/repos/shogun-toolbox/shogun/stargazers","contributors_url":"https://api.github.com/repos/shogun-toolbox/shogun/contributors","subscribers_url":"https://api.github.com/repos/shogun-toolbox/shogun/subscribers","subscription_url":"https://api.github.com/repos/shogun-toolbox/shogun/subscription","commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/commits{/sha}","git_commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/commits{/sha}","comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/comments{/number}","issue_comment_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/comments{/number}","contents_url":"https://api.github.com/repos/shogun-toolbox/shogun/contents/{+path}","compare_url":"https://api.github.com/repos/shogun-toolbox/shogun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shogun-toolbox/shogun/merges","archive_url":"https://api.github.com/repos/shogun-toolbox/shogun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shogun-toolbox/shogun/downloads","issues_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues{/number}","pulls_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls{/number}","milestones_url":"https://api.github.com/repos/shogun-toolbox/shogun/milestones{/number}","notifications_url":"https://api.github.com/repos/shogun-toolbox/shogun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shogun-toolbox/shogun/labels{/name}","releases_url":"https://api.github.com/repos/shogun-toolbox/shogun/releases{/id}","deployments_url":"https://api.github.com/repos/shogun-toolbox/shogun/deployments","created_at":"2011-04-01T10:44:32Z","updated_at":"2016-06-30T20:42:22Z","pushed_at":"2016-07-01T11:20:07Z","git_url":"git://github.com/shogun-toolbox/shogun.git","ssh_url":"git@github.com:shogun-toolbox/shogun.git","clone_url":"https://github.com/shogun-toolbox/shogun.git","svn_url":"https://github.com/shogun-toolbox/shogun","homepage":"http://www.shogun-toolbox.org","size":193646,"stargazers_count":1091,"watchers_count":1091,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":591,"mirror_url":null,"open_issues_count":439,"forks":591,"open_issues":439,"watchers":1091,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221"},"html":{"href":"https://github.com/shogun-toolbox/shogun/pull/3221"},"issue":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3221"},"comments":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3221/comments"},"review_comments":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221/comments"},"review_comment":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3221/commits"},"statuses":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/c1fb5238155f91844bca1130c44d2a2074aa8eb5"}}}}
{"actor":{"display_login":"karlnapf"}}