1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-12-23 09:14:29 +00:00

overhaul of the function class

This commit is contained in:
2015-02-24 17:00:19 +00:00
parent b061e9093f
commit 465499626b
23 changed files with 326 additions and 103 deletions

View File

@@ -8,8 +8,8 @@ using namespace Latan;
int main(void)
{
constexpr double a = 1., b = 10.;
DoubleFunction f1(2, [a](const double *x){return a*(1.-x[0]);});
DoubleFunction f2(2, [b](const double *x){return b*(x[1]-x[0]*x[0]);});
DoubleFunction f1([a](const double *x){return a*(1.-x[0]);}, 2);
DoubleFunction f2([b](const double *x){return b*(x[1]-x[0]*x[0]);}, 2);
vector<DoubleFunction *> system = {&f1, &f2};
GslHybridRootFinder solve(2);
DVec init(2), x;