{"id":13484528,"url":"https://github.com/SciRuby/rb-gsl","last_synced_at":"2025-03-27T16:30:56.950Z","repository":{"id":4066050,"uuid":"5170153","full_name":"SciRuby/rb-gsl","owner":"SciRuby","description":"Ruby interface to the GNU Scientific Library","archived":false,"fork":false,"pushed_at":"2024-06-03T15:27:16.000Z","size":5646,"stargazers_count":102,"open_issues_count":36,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-22T06:01:46.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/SciRuby/rb-gsl","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SciRuby.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-07-24T19:28:41.000Z","updated_at":"2025-02-06T13:41:34.000Z","dependencies_parsed_at":"2024-06-18T15:30:34.397Z","dependency_job_id":"c91f7571-3711-47a3-992c-d77bb8b772a4","html_url":"https://github.com/SciRuby/rb-gsl","commit_stats":{"total_commits":161,"total_committers":10,"mean_commits":16.1,"dds":0.5341614906832298,"last_synced_commit":"103a3e1941e220befd037e0f4289a82c551ae250"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Frb-gsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Frb-gsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Frb-gsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Frb-gsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SciRuby","download_url":"https://codeload.github.com/SciRuby/rb-gsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245509592,"owners_count":20627011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:25.669Z","updated_at":"2025-03-27T16:30:55.868Z","avatar_url":"https://github.com/SciRuby.png","language":"C","funding_links":[],"categories":["Scientific","Related Resources"],"sub_categories":["Vector search"],"readme":"# Ruby/GSL, a Ruby interface to GSL (GNU Scientific library)\n\nPermission is granted to copy, distribute and/or modify this document under\nthe terms of the GNU Free Documentation License.\n\n## Description\n\nRuby/GSL is a Ruby interface to the [GNU Scientific Library](https://gnu.org/software/gsl/)\n(GSL), for numerical computing with [Ruby](http://www.ruby-lang.org/).\n\nRuby/GSL is compatible with GSL versions upto 2.1.\n\n## Usage with GSL 2.1\n\nAs of this release, GSL 2.1 has not made it's way into the Debian stable repositories. Hence, after compiling GSL 2.1 from source, you will need to set the installation location in your `LD_LIBRARY_PATH` variable. After following standard GSL 2.1 installation procedures, you should do:\n  export LD_LIBRARY_PATH=/usr/local/lib\n\nThe need to do this should not arise if GSL has been installed from `apt-get`.\n\n## Installation\n\nRuby/GSL may be installed as a Ruby Gem by simply running\n\n  gem install gsl\n\nNote that the GSL libraries must already be installed before Ruby/GSL\ncan be installed:\n\nDebian/Ubuntu: +libgsl0-dev+\nFedora/SuSE:   +gsl-devel+\nGentoo:        +sci-libs/gsl+\nOS X:          \u003ctt\u003ebrew install gsl\u003c/tt\u003e\n\nIt is recommended to install the [GNU plotutils](https://gnu.org/software/plotutils/plotutils.html)\npackage. Some of the example scripts in the +examples/+ directory use the\n+graph+ utility included in the package to plot the results. Windows cygwin\nbinaries of \u003ctt\u003eGNU plotutils\u003c/tt\u003e and related packages are available\n[here](http://gnuwin32.sourceforge.net/packages/plotutils.htm).\n\n## NMatrix and NArray usage\n\nRuby/GSL works with [NMatrix](https://github.com/SciRuby/nmatrix) and [NArray](https://github.com/masa16/narray) for a variety of methods. See the docs for a detailed list.\n\n### Basic Installation\n\nIn order to use rb-gsl with NMatrix you must first set the `NMATRIX` environment variable and then install rb-gsl:\n  gem install nmatrix\n  export NMATRIX=1\n  gem install rb-gsl\n\nThis will compile rb-gsl with NMatrix specific functions.\n\nFor using rb-gsl with NArray:\n  gem install narray\n  export NARRAY=1\n  gem install rb-gsl\n\nNote that setting both `NMATRIX` and `NARRAY` variables will lead to undefined behaviour. Only one can be used at a time.\n\n### NMatrix basic usage\n\nConvert an NMatrix 1D vector to GSL::Vector:\n``` ruby\nrequire 'gsl'\n\nnm = NMatrix.new([5], [1,2,3,4,5], dtype: :float64)\n#=\u003e [1.0, 2.0, 3.0, 4.0, 5.0]\nnm.to_gslv\n# =\u003e GSL::Vector\n# [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 ]\n```\n\nConvert an integer 2D NMatrix to GSL::Matrix::Int:\n``` ruby\n\nrequire 'gsl'\nnm = NMatrix.new([3,3], [2]*9, dtype: :int32)\n#=\u003e \n#[\n#  [2, 2, 2]   [2, 2, 2]   [2, 2, 2] ]\nnm.to_gslm\n#=\u003e GSL::Matrix::Int\n#[ 2 2 2 \n#  2 2 2 \n#  2 2 2 ]\n```\n\nConvert GSL::Vector to 1D NMatrix:\n``` ruby\ng = GSL::Vector.alloc(1,2,3,4)\n# =\u003e GSL::Vector\n# [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 ]\ng.to_nm\n# =\u003e [1.0, 2.0, 3.0, 4.0]\n```\n\n`to_nm` can be used on all sorts of `GSL::Vector` and `GSL::Matrix` objects to convert them to NMatrix.\n\nFor a detailed list of methods that are compatible with NMatrix, see 'nmatrix' in the [docs](https://sciruby.github.com/rb-gsl).\n\n## Reference\n\nThe [Ruby/GSL reference manual](link:rdoc/ref_rdoc.html) follows and borrows\nlarge parts of the GSL reference manual.\n\n\n## Examples\n\nSee scripts in +examples/+ and +test/+ directories.\n\n\n## Related Projects\n\n* [ruby-gsl](http://ruby-gsl.sourceforge.net/): Another Ruby binding,\n  developed by Arno Erpenbeck.\n\n\n## Licence\n\nRuby/GSL is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License.\nThis library is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY.\n\n\n## Bug Reports\n\nAny bug reports are welcome. If you encounter bugs in Ruby/GSL, please\nreport them on GitHub(https://github.com/SciRuby/rb-gsl/issues).\n\n## Testing and Contributing\n\nIf you wish to make contributions, run the following commands to clone and test the gem on your local machine:\n  git clone https://github.com/SciRuby/rb-gsl.git\n  cd rb-gsl\n  bash test.sh\n\nThis will run tests with and without NMatrix/NArray.\n\n## Links\n\nDocumentation: https://sciruby.github.com/rb-gsl\nSource code:   https://github.com/SciRuby/rb-gsl\nRubyGem:       https://rubygems.org/gems/rb-gsl\nBug tracker:   https://github.com/SciRuby/rb-gsl/issues\nTravis CI:     https://travis-ci.org/SciRuby/rb-gsl\n\n\n## Authors\n\n* Yoshiki Tsunesada \u003cy-tsunesada at mm dot em-net dot ne dot jp\u003e (July, 2004)\n* David MacMahon \u003cdavidm@astro.berkeley.edu\u003e (November, 2010)\n* Jens Wille \u003cmailto:jens.wille@gmail.com\u003e (November, 2013)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSciRuby%2Frb-gsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSciRuby%2Frb-gsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSciRuby%2Frb-gsl/lists"}