From d0516fbd4067100e15cad654f8a40fdd73112dd5 Mon Sep 17 00:00:00 2001 From: Rodrigo Botafogo Date: Fri, 31 Mar 2017 17:19:24 -0300 Subject: [PATCH] Add bundle --- .bundle/config | 1 + Jarfile | 2 ++ lib/mdarray/counter.rb | 2 +- mdarray.gemspec | 3 ++- test/colt/matrix/test_properties.rb | 8 ++++---- 5 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .bundle/config create mode 100644 Jarfile diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 0000000..2fbf0ff --- /dev/null +++ b/.bundle/config @@ -0,0 +1 @@ +--- {} diff --git a/Jarfile b/Jarfile new file mode 100644 index 0000000..9908cbd --- /dev/null +++ b/Jarfile @@ -0,0 +1,2 @@ +jar 'org.yaml:snakeyaml' +jar 'org.slf4j:slf4j-simple', '>1.1' diff --git a/lib/mdarray/counter.rb b/lib/mdarray/counter.rb index 53e8e9f..3214275 100644 --- a/lib/mdarray/counter.rb +++ b/lib/mdarray/counter.rb @@ -143,7 +143,7 @@ def each #------------------------------------------------------------------------------------- # Walks the counter along each of the axes. For instance if given axes [0, 2] and # the array shape is [4, 3, 2], then the counter will be [0, 0, 0], [0, 0, 1], - # [1, 0, 1], [1, 0, 1], [2, 0, 0], ... [3, 0, 1] + # [1, 0, 0], [1, 0, 1], [2, 0, 0], ... [3, 0, 1] #------------------------------------------------------------------------------------- def each_along_axes(axes) diff --git a/mdarray.gemspec b/mdarray.gemspec index e78a663..a71e648 100644 --- a/mdarray.gemspec +++ b/mdarray.gemspec @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -require 'rubygems/platform' +require 'rubygems/platform' require './version' @@ -35,6 +35,7 @@ EOF gem.license = 'BSD 2-clause' gem.add_dependency('map', "~> 6.5") + gem.add_development_dependency('shoulda', "~> 3.5") gem.add_development_dependency('simplecov', "~> 0.11") gem.add_development_dependency('yard', "~> 0.8") diff --git a/test/colt/matrix/test_properties.rb b/test/colt/matrix/test_properties.rb index 784c25a..5b94140 100644 --- a/test/colt/matrix/test_properties.rb +++ b/test/colt/matrix/test_properties.rb @@ -62,7 +62,7 @@ class MDArrayTest < Test::Unit::TestCase # diagonaly dominant matrix by row and column diag_dominant = MDMatrix.fromfunction("double", [4, 4]) do |x, y| - (x == y)? 5 * (x +1) + 5 * (y + 1) : x + y + (x == y)? 5 * (x + 1) + 5 * (y + 1) : x + y end # upper diagonal matrix @@ -210,7 +210,7 @@ class MDArrayTest < Test::Unit::TestCase diag_dominant = MDMatrix .from_mdarray(MDArray.fromfunction("float", [4, 4]) do |x, y| if (x == y) - 5 * (x +1) + 5 * (y + 1) + 5 * (x + 1) + 5 * (y + 1) else x + y end @@ -365,7 +365,7 @@ class MDArrayTest < Test::Unit::TestCase diag_dominant = MDMatrix .from_mdarray(MDArray.fromfunction("long", [4, 4]) do |x, y| if (x == y) - 5 * (x +1) + 5 * (y + 1) + 5 * (x + 1) + 5 * (y + 1) else x + y end @@ -521,7 +521,7 @@ class MDArrayTest < Test::Unit::TestCase diag_dominant = MDMatrix .from_mdarray(MDArray.fromfunction("int", [4, 4]) do |x, y| if (x == y) - 5 * (x +1) + 5 * (y + 1) + 5 * (x + 1) + 5 * (y + 1) else x + y end