{"action":"opened","issue":{"url":"https://api.github.com/repos/DO-CV/sara/issues/260","repository_url":"https://api.github.com/repos/DO-CV/sara","labels_url":"https://api.github.com/repos/DO-CV/sara/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/DO-CV/sara/issues/260/comments","events_url":"https://api.github.com/repos/DO-CV/sara/issues/260/events","html_url":"https://github.com/DO-CV/sara/issues/260","id":134337823,"number":260,"title":"MAINT: merge Image and MultiArray classes in one?","user":{"login":"davidok8","id":3859062,"avatar_url":"https://avatars.githubusercontent.com/u/3859062?v=3","gravatar_id":"","url":"https://api.github.com/users/davidok8","html_url":"https://github.com/davidok8","followers_url":"https://api.github.com/users/davidok8/followers","following_url":"https://api.github.com/users/davidok8/following{/other_user}","gists_url":"https://api.github.com/users/davidok8/gists{/gist_id}","starred_url":"https://api.github.com/users/davidok8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidok8/subscriptions","organizations_url":"https://api.github.com/users/davidok8/orgs","repos_url":"https://api.github.com/users/davidok8/repos","events_url":"https://api.github.com/users/davidok8/events{/privacy}","received_events_url":"https://api.github.com/users/davidok8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T16:58:30Z","updated_at":"2016-02-17T16:58:30Z","closed_at":null,"body":"There are little difference in the API and this will reduce the maintenance cost and/or eases the extension of the library.\r\n\r\nWe could use the following C++11 semantics:\r\n```\r\ntemplate <typename T, int N>\r\nusing ImageView = MultiArrayView<T, N, ColMajor>;\r\n\r\ntemplate <typename T, int N>\r\nusing Image = MultiArray<T, N, ColMajor>;\r\n```\r\n\r\nThen disallow the following usage if `MultiArrayView` object is not `ColMajor`.\r\n```\r\n    //! Return image width.\r\n    inline int width() const\r\n    {\r\n      static_assert(StorageOrder == ColMajor, \"MultiArrayView must be ColMajor\");\r\n      return this->base_type::rows();\r\n    }\r\n\r\n    //! Return image height.\r\n    inline int height() const\r\n    {\r\n      static_assert(StorageOrder == ColMajor, \"MultiArrayView must be ColMajor!\");\r\n      return this->base_type::cols();\r\n    }\r\n```"}}