gsl

Problems installing gsl gem

£可爱£侵袭症+ 提交于 2019-11-27 14:43:04
问题 I can succesfully install the gsl library in my home directory, but when I try to install the gsl gem I get a big list of errors that I do not understand. I am wondering if someone could give me some idea why I could be getting those errors. I can say I have: Installed gsl succesfully; at least that is what it looked like. I pointed the path to gsl-config This is what the error log looks like: Building native extensions. This could take a while... ERROR: Error installing gsl: ERROR: Failed to

How to build GSL with msvc2010?

旧时模样 提交于 2019-11-27 13:05:23
问题 I'm working with Qt 4.8.3 and QtCreator, which I've compiled with msvc2010 as per the instructions here. Now however I need to link to GSL (Gnu Scientific Library), but currently I only know how to build it with g++ which produces linker errors just as described here, undoubtedly for the reason given in the answer by @EvanTeran. However, in my case, building Qt with g++ via cygwin is probably not an option--I've just come off a multi-day nightmare during which I tried to do just this, but

C function pointers with C++11 lambdas

徘徊边缘 提交于 2019-11-27 04:55:17
So i'm trying to write an Integration function to be used with c++11 lambdas. The code looks something like this: double Integrate(std::function<double(double,void*)> func, double a,double b,std::vector<double> & params) { gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000); gsl_function F; F.function =func; F.params = (void*)&params; double error,result; gsl_integration_qag (&F, a, b, 0, 1e-7, 1000,GSL_INTEG_GAUSS61,w, &result, &error); gsl_integration_workspace_free (w); return result; } void Another_function() { //... Integrate([](double a,void* param) { return ((vector

how to avoid static member function when using gsl with c++

主宰稳场 提交于 2019-11-27 02:01:00
I would like to use GSL within a c++ class without declaring member functions as static . The reason for this is because I don't know them too well and I'm not sure about thread safety. From what I read, std::function might be a solution but I'm not sure how to use it. My question comes down to how can I remove static in declaration of g ? #include<iostream> #include <functional> #include <stdlib.h> #include <gsl/gsl_math.h> #include <gsl/gsl_monte.h> #include <gsl/gsl_monte_plain.h> #include <gsl/gsl_monte_miser.h> #include <gsl/gsl_monte_vegas.h> using namespace std; class A { public: static

how to avoid static member function when using gsl with c++

Deadly 提交于 2019-11-26 12:19:33
问题 I would like to use GSL within a c++ class without declaring member functions as static . The reason for this is because I don\'t know them too well and I\'m not sure about thread safety. From what I read, std::function might be a solution but I\'m not sure how to use it. My question comes down to how can I remove static in declaration of g ? #include<iostream> #include <functional> #include <stdlib.h> #include <gsl/gsl_math.h> #include <gsl/gsl_monte.h> #include <gsl/gsl_monte_plain.h>

C function pointers with C++11 lambdas

落花浮王杯 提交于 2019-11-26 11:24:03
问题 So i\'m trying to write an Integration function to be used with c++11 lambdas. The code looks something like this: double Integrate(std::function<double(double,void*)> func, double a,double b,std::vector<double> & params) { gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000); gsl_function F; F.function =func; F.params = (void*)&params; double error,result; gsl_integration_qag (&F, a, b, 0, 1e-7, 1000,GSL_INTEG_GAUSS61,w, &result, &error); gsl_integration_workspace_free (w);