Sha256: e3382bd706c0a642aac8444a8d687331ea28138c05ae1c82d01acb8d445f571f

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

# = NMatrix
#
# A linear algebra library for scientific computation in Ruby.
# NMatrix is part of SciRuby.
#
# NMatrix was originally inspired by and derived from NArray, by
# Masahiro Tanaka: http://narray.rubyforge.org
#
# == Copyright Information
#
# SciRuby is Copyright (c) 2010 - 2012, Ruby Science Foundation
# NMatrix is Copyright (c) 2012, Ruby Science Foundation
#
# Please see LICENSE.txt for additional copyright notices.
#
# == Contributing
#
# By contributing source code to SciRuby, you agree to be bound by
# our Contributor Agreement:
#
# * https://github.com/SciRuby/sciruby/wiki/Contributor-Agreement
#
# == rspec_spec.rb
#
# A spec for testing monkey patches to RSpec for NMatrix.
#
require File.join(File.dirname(__FILE__), "spec_helper.rb")

describe "RSpec" do
  it "should permit #be_within to be used on a dense NMatrix" do
    (NMatrix.new(:dense, [4,1], 1.0, :complex128) / 10000.0).should be_within(0.00000001).of(NMatrix.new(:dense, [4,1], 0.0001, :float64))
    (NMatrix.new(:dense, [4,1], 1.0, :complex128) / 10000.0).should_not be_within(0.00000001).of(NMatrix.new(:dense, [4,1], 1.0, :float64))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nmatrix-0.0.9 spec/rspec_spec.rb
nmatrix-0.0.8 spec/rspec_spec.rb
nmatrix-0.0.7 spec/rspec_spec.rb