{"action":"created","issue":{"url":"https://api.github.com/repos/jakobbossek/smoof/issues/57","labels_url":"https://api.github.com/repos/jakobbossek/smoof/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/jakobbossek/smoof/issues/57/comments","events_url":"https://api.github.com/repos/jakobbossek/smoof/issues/57/events","html_url":"https://github.com/jakobbossek/smoof/issues/57","id":116820317,"number":57,"title":"Remove dimensions from makeUFFunction","user":{"login":"lkreft","id":7272920,"avatar_url":"https://avatars.githubusercontent.com/u/7272920?v=3","gravatar_id":"","url":"https://api.github.com/users/lkreft","html_url":"https://github.com/lkreft","followers_url":"https://api.github.com/users/lkreft/followers","following_url":"https://api.github.com/users/lkreft/following{/other_user}","gists_url":"https://api.github.com/users/lkreft/gists{/gist_id}","starred_url":"https://api.github.com/users/lkreft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkreft/subscriptions","organizations_url":"https://api.github.com/users/lkreft/orgs","repos_url":"https://api.github.com/users/lkreft/repos","events_url":"https://api.github.com/users/lkreft/events{/privacy}","received_events_url":"https://api.github.com/users/lkreft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jakobbossek/smoof/milestones/2","html_url":"https://github.com/jakobbossek/smoof/milestones/v1.2","labels_url":"https://api.github.com/repos/jakobbossek/smoof/milestones/2/labels","id":1427227,"number":2,"title":"v1.2","description":null,"creator":{"login":"jakobbossek","id":4079979,"avatar_url":"https://avatars.githubusercontent.com/u/4079979?v=3","gravatar_id":"","url":"https://api.github.com/users/jakobbossek","html_url":"https://github.com/jakobbossek","followers_url":"https://api.github.com/users/jakobbossek/followers","following_url":"https://api.github.com/users/jakobbossek/following{/other_user}","gists_url":"https://api.github.com/users/jakobbossek/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobbossek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobbossek/subscriptions","organizations_url":"https://api.github.com/users/jakobbossek/orgs","repos_url":"https://api.github.com/users/jakobbossek/repos","events_url":"https://api.github.com/users/jakobbossek/events{/privacy}","received_events_url":"https://api.github.com/users/jakobbossek/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-11-24T13:27:43Z","updated_at":"2015-11-24T13:27:43Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-11-13T18:14:13Z","updated_at":"2015-11-24T13:27:59Z","closed_at":null,"body":"I would really like to remove the `dimensions` parameter from the UFx functions because it would provide much more flexiblity in their use. We could easily get rid of it by calculating `r_dimensions` from `r_x.size()` at the [cec09 r-to-c interface](../blob/master/src/cec09_r_to_c_interface.c).\r\n\r\nThe problem is, though, that the lower and upper bounds would not be displayed as before. My suggestion is to replace e.g. `c(0, rep(-1, dimensions - 1L))` with `c(\"0\", \"-1\", \"...\", \"-1\")`.\r\n\r\nNevertheless, if this is not an option for you, we should definitely add a `stopifnot(length(x) == dimensions)` to the function definition `fn`of `makeUFFunction` because it's broken at the moment:\r\n\r\n```R\r\n> uf2_3 = makeUFFunction(3,2)\r\n> uf2_5 = makeUFFunction(5,2)\r\n> uf2_3(rep(0.2, 3))\r\n[1] 0.2365430 0.5695384\r\n> uf2_3(rep(0.2, 5))\r\n[1] 0.2365430 0.5695384\r\n> uf2_5(rep(0.2, 5))\r\n[1] 0.2884053 0.5835806\r\n```\r\n\r\nEdit: would really love to add the labels \"Suggestion\", \"Bug\" and \"Enhancement\" here..."},"comment":{"url":"https://api.github.com/repos/jakobbossek/smoof/issues/comments/159267039","html_url":"https://github.com/jakobbossek/smoof/issues/57#issuecomment-159267039","issue_url":"https://api.github.com/repos/jakobbossek/smoof/issues/57","id":159267039,"user":{"login":"jakobbossek","id":4079979,"avatar_url":"https://avatars.githubusercontent.com/u/4079979?v=3","gravatar_id":"","url":"https://api.github.com/users/jakobbossek","html_url":"https://github.com/jakobbossek","followers_url":"https://api.github.com/users/jakobbossek/followers","following_url":"https://api.github.com/users/jakobbossek/following{/other_user}","gists_url":"https://api.github.com/users/jakobbossek/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobbossek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobbossek/subscriptions","organizations_url":"https://api.github.com/users/jakobbossek/orgs","repos_url":"https://api.github.com/users/jakobbossek/repos","events_url":"https://api.github.com/users/jakobbossek/events{/privacy}","received_events_url":"https://api.github.com/users/jakobbossek/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T13:27:59Z","updated_at":"2015-11-24T13:27:59Z","body":"> I would really like to remove the dimensions parameter from the UFx functions because it would\r\n> provide much more flexiblity in their use. We could easily get rid of it by calculating r_dimensions from\r\n>  r_x.size() at the cec09 r-to-c interface.\r\n\r\n> The problem is, though, that the lower and upper bounds would not be displayed as before. My \r\n> suggestion is to replace e.g. c(0, rep(-1, dimensions - 1L)) with c(\"0\", \"-1\", \"...\", \"-1\"). \r\nYes we could do this, but for consistency reasons the I will not change the interface here.\r\nMoreover, the solution proposed for the lower/upper bounds is not satisfactory, since this should always be a numeric vector.\r\n\r\nHowever, adding the sanity check to the function body is a good idea. Going to add it to all functions."}}