SparseMatrix Build Status

Build a sparce matrix from dense matrix

RubyGems

https://rubygems.org/gems/sparse_matrix

Tree

.

Installation

Add this line to your application's Gemfile:

gem 'sparse_matrix'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sparse_matrix

How to Use

require 'sparse_matrix'
DM = DenseMatrix.new(2,2,[[1.0,2.0],[4.0,5.0]])
SM = SparseMatrix::SparseMatrix.new(2,2,[[2.0,0.0],[4.0,0.0]])
SM+DM

Authors

Kevin Robayna 
Jose Antonio Rodriguez Leandro