multiarray 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rake/packagetask'
6
6
  require 'rbconfig'
7
7
 
8
8
  PKG_NAME = 'multiarray'
9
- PKG_VERSION = '0.13.0'
9
+ PKG_VERSION = '0.14.0'
10
10
  RB_FILES = FileList[ 'lib/**/*.rb' ]
11
11
  TC_FILES = FileList[ 'test/tc_*.rb' ]
12
12
  TS_FILES = FileList[ 'test/ts_*.rb' ]
data/lib/multiarray.rb CHANGED
@@ -582,7 +582,7 @@ require 'multiarray/gccfunction'
582
582
  # Namespace of Hornetseye computer vision library
583
583
  module Hornetseye
584
584
 
585
- # Method for performing computations in lazy mode
585
+ # Method for performing computations in lazy mode resulting in a lazy expression
586
586
  #
587
587
  # @param [Array<Integer>] *shape Optional shape of result. The method
588
588
  # attempts to infer the shape if not specified.
@@ -613,14 +613,14 @@ module Hornetseye
613
613
 
614
614
  module_function :lazy
615
615
 
616
- # Method for performing computations in eager mode
616
+ # Method for performing a lazy computation and then forcing the result
617
617
  #
618
618
  # @param [Array<Integer>] *shape Optional shape of result. The method
619
619
  # attempts to infer the shape if not specified.
620
620
  # @yield Operation computing array elements.
621
621
  #
622
622
  # @return [Object,Node] Result of computation.
623
- def eager( *shape, &action )
623
+ def finalise( *shape, &action )
624
624
  previous = Thread.current[ :lazy ]
625
625
  Thread.current[ :lazy ] = false
626
626
  begin
@@ -631,7 +631,7 @@ module Hornetseye
631
631
  end
632
632
  end
633
633
 
634
- module_function :eager
634
+ module_function :finalise
635
635
 
636
636
  # Method for summing values
637
637
  #
@@ -297,7 +297,7 @@ module Hornetseye
297
297
  if other.is_a? Node
298
298
  if variables.empty?
299
299
  if other.array_type == array_type
300
- Hornetseye::eager { eq( other ).inject( true ) { |a,b| a.and b } }
300
+ Hornetseye::finalise { eq( other ).inject( true ) { |a,b| a.and b } }
301
301
  else
302
302
  false
303
303
  end
@@ -52,8 +52,8 @@ class TC_MultiArray < Test::Unit::TestCase
52
52
  Hornetseye::sum *args, &action
53
53
  end
54
54
 
55
- def eager( *args, &action )
56
- Hornetseye::eager *args, &action
55
+ def finalise( *args, &action )
56
+ Hornetseye::finalise *args, &action
57
57
  end
58
58
 
59
59
  def setup
@@ -373,7 +373,7 @@ class TC_MultiArray < Test::Unit::TestCase
373
373
  m = M[ [ 1, 2, 3 ], [ 4, 5, 6 ] ]
374
374
  assert_equal 21, sum { |i,j| m[ i, j ] }
375
375
  assert_equal [ 5, 7, 9 ], sum { |i| m[ i ] }.to_a
376
- assert_equal [ 6, 15 ], eager { |j| sum { |i| m[ i, j ] } }.to_a
376
+ assert_equal [ 6, 15 ], finalise { |j| sum { |i| m[ i, j ] } }.to_a
377
377
  assert_equal [ [ 1, 2, 3 ] , [ 4, 5, 6 ] ], sum { || m }.to_a
378
378
  end
379
379
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 13
7
+ - 14
8
8
  - 0
9
- version: 0.13.0
9
+ version: 0.14.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-06 00:00:00 +00:00
17
+ date: 2010-12-14 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency