PT1_week05
@apietak @gfederic @jbachmann @lbrodbeck @mkryukov
Hello,
I have a couple of questions regarding my solutions for problems 5.2 and 5.3 and would appreciate some detailed feedback.
Problem 5.2 (simpson2D.hpp): I feel that my implementation for the 2D integration function is a bit clumsy and heavy-handed. How could I refactor or streamline the syntax to make it more elegant?
Problem 5.3 (simpson_traits):
My definitions for domain_t and result_t go through an intermediate struct, function_traits. I did this to have a single, non-specialized definition for both traits. Is this the correct approach, or would it be better to specialize domain_t and result_t directly for sin_lambda_x without leveraging the function_traits specialization?
In the same problem, I found that I had to explicitly specify the integrand's class type every time I called the integrate function. Is there a way to avoid this and allow the compiler to deduce the type automatically?
Please be as detailed and nitpicky as possible in your corrections.
Thank you!