w05-g01-newton-raphson-function
Newton Raphson Function
Basics
Before starting with your assignment, please go through the following basic exercises:
- w05-bsc-functions-1 #10 (closed)
- w05-bsc-functions-2 #11 (closed)
Objective
The overall objective of this assignment is to implement the Newton Raphson Method in various functions. Specifically, the code needs to be split into meaningful subparts and implemented in functions.
The details of newton raphson method is described in the issue w03-g01-newton-raphson
. The details of inverse matrix is described in the issue w04-g01-inverse-matrix
.
Implementation
-
Use the file named
newton_raphson_function.cpp
as a starting point which is provided in thetehpc/basics/
directory. -
Include the header file "matrices_operations.h" on the top of
newton_raphson_function.cpp
. -
Follow the comments given in the file and complete the implememtation of functions based on the corresponding code in
tehpc/basics/newton_raphson.cpp
andtehpc/basics/inverse_matrix.cpp
. Use available function frommatrices_operations.h
wherever possible. -
Make sure that your code is well structured and commented.
Notes:
Compile and run your code by:
- going into the
tehpc/build/
folder - copy
tehpc/basics/matrices_operations.h
to here - compile with the following command:
g++ -Werror -Wpedantic -g -o newton_raphson_function ../basics/newton_raphson_function.cpp
- run code with
./newton_raphson_function