Timeline for C++ determinant calculator
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 10, 2020 at 13:23 | comment | added | Toby Speight | @S.S.Anne, that might make sense (I'm guessing that most compilers are smart enough to copy characters rather than blindly using references as coded). | |
Feb 10, 2020 at 13:21 | comment | added | Toby Speight | Thanks @Martin. That makes more sense for an empty product. | |
Feb 10, 2020 at 13:21 | history | edited | Toby Speight | CC BY-SA 4.0 |
Empty matrix determinant is one; use auto for char type (to support `std::wstring` etc.)
|
Feb 10, 2020 at 12:53 | comment | added | Martin R | “empty matrix has zero determinant” – Actually not: codereview.stackexchange.com/a/236988/35991 :) | |
Feb 10, 2020 at 12:20 | comment | added | S.S. Anne |
I would use const auto& in the range-for loop, not that the type of a string will ever change.
|
|
Feb 10, 2020 at 10:45 | vote | accept | CommunityBot | ||
Feb 10, 2020 at 10:37 | history | edited | Toby Speight | CC BY-SA 4.0 |
added 1082 characters in body
|
Feb 10, 2020 at 10:26 | comment | added | Toby Speight |
That would be a good choice, as that handles memory management etc. Do note that vector-of-vector doesn't have the good locality properties of array-of-array, so consider using or making a matrix class that's more efficient. You could use OpenCV cv::Mat , or look at the Matrix class I recently reviewed.
|
|
Feb 10, 2020 at 10:15 | comment | added | user214772 | Should I use vectors instead? | |
Feb 10, 2020 at 9:48 | history | answered | Toby Speight | CC BY-SA 4.0 |