* 3 points from a new user of gsl
@ 2001-12-19 13:20 Jean-Max Redonnet
2001-12-19 13:20 ` Toby White
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jean-Max Redonnet @ 2001-12-19 13:20 UTC (permalink / raw)
To: gsl-discuss
Hi,
I'm a new user of gsl. I plan to use it for managing with vectors and
matrices and multidimensional root finding.
Here is my first impression on this library (be indulgent, i'm not a great
hacker, just a phD in mechanical engineering needing free tools to solve its
problems).
I'm using version 0.7 on Mandrake 8.0.
Install with rpm package is ok. Good job.
Just a small problem
$ /usr/bin/gsl-config --libs
returns
-L/usr/lib -lgsl -lm
This not include -lblas that might be useful sometines. Is it normal ?
Multidimensional root finding :
works fine especially with newton algorithm (as expected).
just a suggestion : It would be nice sometimes to be able to bound each
variable. I've not find an easy way to do this in current release. Although
this may help the algorithm to find the "right" solution. Is it possible ? Is
it reasonnable to imagine this will be possible in future releases?
Vectors and matrices
I've not found any function to get the norm of a vector, so I've writed my
own one, but I think this may be useful to include this feture in future
release. What about this suggestion?
Here is my code to do this - Need improvements (especially to manage
infinities)
double
vector_norm(gsl_vector *v, int n)
{
int i;
double tmp = 0;
for(i = 0; i < v->size; i++)
{
tmp += pow(gsl_vector_get (v, i), n);
}
return sqrt(tmp);
}
Hope this points are in scope of this mailing list.
Jean-Max Redonnet
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3 points from a new user of gsl
2001-12-19 13:20 3 points from a new user of gsl Jean-Max Redonnet
@ 2001-12-19 13:20 ` Toby White
2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20 ` Philip Kendall
2 siblings, 0 replies; 4+ messages in thread
From: Toby White @ 2001-12-19 13:20 UTC (permalink / raw)
To: jmax.redonnetNO; +Cc: gsl-discuss
Jean-Max Redonnet <jmax.redonnet@meca.insa-tlse.fr> writes:
> Hi,
>
> I'm a new user of gsl. I plan to use it for managing with vectors and
> matrices and multidimensional root finding.
> Here is my first impression on this library (be indulgent, i'm not a great
> hacker, just a phD in mechanical engineering needing free tools to solve its
[snip]
> Multidimensional root finding :
> works fine especially with newton algorithm (as expected).
> just a suggestion : It would be nice sometimes to be able to bound each
> variable. I've not find an easy way to do this in current release. Although
> this may help the algorithm to find the "right" solution. Is it possible ? Is
> it reasonnable to imagine this will be possible in future releases?
I do this by transforming the bounded variables onto an infinite space
before applying the solver;
e.g. one of my variables is not allowed to be less than zero, or greater
than 0.74 - so I transform by
tan(((x)-0.37)*M_PI/0.74)
before applying the solver, and afterwards by
atan(x)*0.74/M_PI+0.37.
Similar functions can be dreamt up for more complicated bounds.
Which means the solver doesn't have to care about bounds, but the
value of my variable will never go outside its proper range.
Toby
--
Toby White, University Chemical Lab., Lensfield Road, Cambridge. CB2 1EW. U.K.
Email: <tow@theor.ch.cam.ac.uk> GPG Key ID: 1DE9DE75
Web: <URL: http://ket.ch.cam.ac.uk/people/tow/index.html >
Tel: +44 1223 336423
Fax: +44 1223 336362
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3 points from a new user of gsl
2001-12-19 13:20 3 points from a new user of gsl Jean-Max Redonnet
2001-12-19 13:20 ` Toby White
2001-12-19 13:20 ` Brian Gough
@ 2001-12-19 13:20 ` Philip Kendall
2 siblings, 0 replies; 4+ messages in thread
From: Philip Kendall @ 2001-12-19 13:20 UTC (permalink / raw)
To: gsl-discuss
On Fri, Jun 15, 2001 at 04:25:16PM +0200, Jean-Max Redonnet wrote:
>
> Just a small problem
> $ /usr/bin/gsl-config --libs
> returns
> -L/usr/lib -lgsl -lm
> This not include -lblas that might be useful sometines. Is it normal ?
Yes, for 0.7; 0.8 (which has been out for a couple of weeks now) include
the BLAS libraries in the output of `gsl-config --libs`.
> Vectors and matrices
> I've not found any function to get the norm of a vector
double gsl_blas_dnrm2 (const gsl_vector * X) gives you the Euclidean
norm (certainly in 0.8 and I guess it's in 0.7).
HTH,
Phil
--
Philip Kendall <pak@ast.cam.ac.uk>
http://www.srcf.ucam.org/~pak21/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3 points from a new user of gsl
2001-12-19 13:20 3 points from a new user of gsl Jean-Max Redonnet
2001-12-19 13:20 ` Toby White
@ 2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20 ` Philip Kendall
2 siblings, 0 replies; 4+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
To: jmax.redonnet; +Cc: gsl-discuss
Jean-Max Redonnet writes:
> Multidimensional root finding : works fine especially with newton
> algorithm (as expected). just a suggestion : It would be nice
> sometimes to be able to bound each variable. I've not find an easy
> way to do this in current release. Although this may help the
> algorithm to find the "right" solution. Is it possible ? Is it
> reasonnable to imagine this will be possible in future releases?
It's possible, if someone wants to write it.
> Vectors and matrices I've not found any function to get the norm
> of a vector, so I've writed my own one, but I think this may be
> useful to include this feture in future release. What about this
> suggestion?
Thanks, I'll add an entry to the TODO file for vector p-norms, and
some matrix norms.
> Hope this points are in scope of this mailing list.
Yes.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-12-19 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 3 points from a new user of gsl Jean-Max Redonnet
2001-12-19 13:20 ` Toby White
2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20 ` Philip Kendall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).