diff --git a/SCE/SCE/SCE.cpp b/SCE/SCE/SCE.cpp index 5dae522..81ada93 100644 --- a/SCE/SCE/SCE.cpp +++ b/SCE/SCE/SCE.cpp @@ -1,6 +1,7 @@ #include "3d.h" #include #include "lgs.h" +#include "nlgs.h" using namespace std; void cylinder(); @@ -39,6 +40,7 @@ void cylinder() cylinder.compute_options(); } + void lgs() { LGS lgs; @@ -47,6 +49,7 @@ void lgs() cout << lgs.cramer(); cout << endl; } + void nlgs() { diff --git a/SCE/SCE/nlgs.cpp b/SCE/SCE/nlgs.cpp index 4bd4481..e491d54 100644 --- a/SCE/SCE/nlgs.cpp +++ b/SCE/SCE/nlgs.cpp @@ -53,6 +53,17 @@ long double nlgs::newton(long double start, int limit) return x; } +long double nlgs::secant(long double A, long double B, int limit) +{ + long double a = A, b = B; + for (int i = limit; i--;) + { + + } + return a; +} + + diff --git a/SCE/SCE/nlgs.h b/SCE/SCE/nlgs.h index c1edab5..e05b7de 100644 --- a/SCE/SCE/nlgs.h +++ b/SCE/SCE/nlgs.h @@ -10,7 +10,7 @@ public: long double bisektion(long double, long double, int); //a, b, number of iterations long double fixedpoint(long double, int); //start, number of iterations long double newton(long double, int); //start, number of iterations - long double secant(); + long double secant(long double, long double, int); //a, b, number of iterations nlgs(){}; ~nlgs(){}; };