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 "3d.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "lgs.h"
|
#include "lgs.h"
|
||||||
|
#include "nlgs.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void cylinder();
|
void cylinder();
|
||||||
|
|
@ -39,6 +40,7 @@ void cylinder()
|
||||||
cylinder.compute_options();
|
cylinder.compute_options();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lgs()
|
void lgs()
|
||||||
{
|
{
|
||||||
LGS lgs;
|
LGS lgs;
|
||||||
|
|
@ -47,6 +49,7 @@ void lgs()
|
||||||
cout << lgs.cramer();
|
cout << lgs.cramer();
|
||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nlgs()
|
void nlgs()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,17 @@ long double nlgs::newton(long double start, int limit)
|
||||||
return x;
|
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 bisektion(long double, long double, int); //a, b, number of iterations
|
||||||
long double fixedpoint(long double, int); //start, 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 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(){};
|
||||||
~nlgs(){};
|
~nlgs(){};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue