0

I couldn't find any material regarding using gnu scientific library in swift under Linux. Is it possible? If so, then how?

For example, I am interested in generating random numbers with normal distribution with gsl_ran_gaussian.

Yrogirg
  • 2,301
  • 3
  • 22
  • 33

1 Answers1

1

It should be possible using, for example, system modules. See this question: Use a C library in Swift on Linux

Yet another approach is in answers to this question: Compile C code and expose it to Swift under Linux

If you want to use only a small subset of the API, then you might save some effort by writing a C wrapper around the needed functionality and calling that wrapper from Swift.

Community
  • 1
  • 1
Anatoli P
  • 4,791
  • 1
  • 18
  • 22