[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] solver types and code correctness

From: Gideon Simpson
Subject: [Help-gsl] solver types and code correctness
Date: Mon, 29 Oct 2007 10:22:50 -0400

Suppose I want to solve an equation using Brent's method.

Following the example code, I declare:

const gsl_root_fsolver_type * T;
gsl_root_fsolver * s;

T = gsl_root_fsolver_brent;
s = gsl_root_fsolver_alloc(T);

But if I don't intend to switch solver types, is there any reason not to declare:

s = gsl_root_fsolver_alloc(gsl_root_fsolver_brent);

instead, and forgo the creation of the gsl_root_fsolver_type * ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]