mirror of https://github.com/Askill/AP-SCE.git
This commit is contained in:
parent
20b9c945f7
commit
6315877d26
|
|
@ -1,6 +1,7 @@
|
|||
#include "3d.h"
|
||||
#include <iostream>
|
||||
#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()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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(){};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue