Using Ruby/GSL


See here.

Load the library

Put at the head of your scripts,

require 'rubygems' # if installed via RubyGems
require 'gsl'

Naming conventions, C Structs and Ruby Classes

Most of the GSL data types, functions or constants are named as gsl_xxx or GSL_XXX. In Ruby/GSL, the prefix gsl_ is replaced by the module identifier GSL::, where GSL is the top level module of Ruby/GSL, and the Ruby classes are defined for each of the GSL C structs under the GSL module. According to the Ruby manner, the name of each class begins with a capital. For example,


See the directories “examples/” and “tests/”.

Some of the examples use the graph utility to show the results. The graph utility is included in the GNU plotutils package. Windows-cygwin binaries of GNU plotutils and related packages are available from here.

Modules and Classes

The following is the list of Ruby/GSL modules and classes, <Name> (<Module or Class>)

prev next

Reference index top