hello to everyone, here is a partial binding of GSL. I will add the rest as soon as I write it.
attachments should be copied to the vala/vapi folder
Here's an example:
// test.vala
// compile with: valac test.vala --pkg gsl
using GLib;
using Gsl;
public class Test : GLib.Object
{
public static void main (string[] args)
{
double mean, max, min;
double[] data = new double[] { 17.2, 18.1, 16.5, 18.3, 12.6 };
mean = Stats.mean (data, 1, data.length);
Stats.minmax (out min, out max, data, 1, data.length);
stdout.printf("mean %g\n", mean);
stdout.printf("min %g\n", min);
stdout.printf("max %g\n", max);
}
}
Here's an other:
// test2.vala
// compile with: valac test2.vala --pkg gsl
using GLib;
using Gsl;
public class Test : GLib.Object
{
public static void main (string[] args)
{
GslComplex a = Complex.rect(3, 4);
GslComplex b = Complex.rect(1, 2);
GslComplex z = Complex.add(a, b);
stdout.printf("result = %g+%gi\n", z.real, z.imag);
}
}
Matias
gsl.deps
Description: Binary data
gsl.vapi
Description: Binary data
gsl-complex.vapi
Description: Binary data
gsl-stats.vapi
Description: Binary data
_______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
