Title: [FR] Function overloading for init() method · Issue #61 · mlcpp/Matrix · GitHub
Open Graph Title: [FR] Function overloading for init() method · Issue #61 · mlcpp/Matrix
X Title: [FR] Function overloading for init() method · Issue #61 · mlcpp/Matrix
Description: Currently, we can only initialize a Matrix object using
Open Graph Description: Currently, we can only initialize a Matrix object using
X Description: Currently, we can only initialize a Matrix object using <std::vector<std::vector<double>> or <std::vector<std::vector<std::string>>. So, if I want to create a Matrix w...
Opengraph URL: https://github.com/mlcpp/Matrix/issues/61
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FR] Function overloading for init() method","articleBody":"Currently, we can only initialize a `Matrix` object using `\u003cstd::vector\u003cstd::vector\u003cdouble\u003e\u003e` or `\u003cstd::vector\u003cstd::vector\u003cstd::string\u003e\u003e`.\r\nSo, if I want to create a `Matrix` with 1 row and 1 column I need to create a 2-D vector object and then use the `init()` method which seems a bit redundant.\r\n\r\n## Describe the solution you'd like\r\nOverload `init()` method such that we can use a `double`, `std::string`, `std::vector\u003cdouble\u003e` and `std::vector\u003cstd::string\u003e` to initialize a `Matrix` object.\r\n\r\n## Expectation\r\nAfter completion, init(2) should give me a `Matrix` object with 1 element. Similarly, for 1-D vectors.\r\n","author":{"url":"https://github.com/aniketsharma00411","@type":"Person","name":"aniketsharma00411"},"datePublished":"2021-01-02T08:22:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/61/Matrix/issues/61"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b2916e09-cde0-da45-cda1-cf81cb9f0a19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3FE:100AB9:1599927:1DF80B8:6A4DF169 |
| html-safe-nonce | c964c6339ece0528238b21841c27db696f188730468761b429182158223fc95d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0ZFOjEwMEFCOToxNTk5OTI3OjFERjgwQjg6NkE0REYxNjkiLCJ2aXNpdG9yX2lkIjoiNjg1NTcxNjEzMDY4MzQ4MjQ3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 446d4b42a32b98d9284735be2450d50e16735cbe620ad58ed344e79df32c60e6 |
| hovercard-subject-tag | issue:777425499 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mlcpp/Matrix/61/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3b8cd0c3ddf5741790884cd57e09e6a67d5f7ad0b8fc3ec096856ac87019318/mlcpp/Matrix/issues/61 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3b8cd0c3ddf5741790884cd57e09e6a67d5f7ad0b8fc3ec096856ac87019318/mlcpp/Matrix/issues/61 |
| og:image:alt | Currently, we can only initialize a Matrix object using |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aniketsharma00411 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/mlcpp/Matrix git https://github.com/mlcpp/Matrix.git |
| octolytics-dimension-user_id | 75084825 |
| octolytics-dimension-user_login | mlcpp |
| octolytics-dimension-repository_id | 297047565 |
| octolytics-dimension-repository_nwo | mlcpp/Matrix |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 297047565 |
| octolytics-dimension-repository_network_root_nwo | mlcpp/Matrix |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width