0

The gsl manual only mentioned that the floating point data can be represented by "gsl_vector_float" or "gsl_matrix_float", but it doesn't provide the methods to operate on these float gsl data. It even doesn't say how to allocate memory for it, and I tried the following, which doesn't work:

gsl_vector_float * v = gsl_vector_alloc(100);

Am I missing some separate manual?

Hailiang Zhang
  • 17,604
  • 23
  • 71
  • 117

1 Answers1

2

The allocation API function is gsl_vector_float_alloc. You can check all the API function declarations for gsl_vector_float on gsl_vector_float.h header (located at gsl/vector)

Vivian Miranda
  • 2,467
  • 1
  • 17
  • 27
  • and if you check the header you will see that you only need to change the prefix "gsl_vector" for "gsl_vector_float" in all API calls to make it work. – Vivian Miranda Mar 25 '14 at 20:27
  • Thanks! Everything is good except for gsl random generator, which seems not have a float version. – Hailiang Zhang Mar 25 '14 at 21:28