Sunday 12 June 2022

Chapter 24 // Exercise 6 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.

Chapter 24 // Exercise 6

In the Gaussian elimination example, replace the vector operations dot_product() and scale_and_add() with loops. Test, comment on the clarity of the code.


For this one I simply copied the code from the Matrix.h files. Replacing the one in the back_substitution was horrible. 

We have functions for a reason; to do tasks, remove duplicate code and make it clear what's happening without commenting.

No comments:

Post a Comment