dither 0.0.15 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e30c0d843bcd684e0cf9b54617eb3f2f73d5258
4
- data.tar.gz: dbb1fa61f6f9e8c88b0dc221480cbe94edd5e596
3
+ metadata.gz: 4231f1c2e7ec627c7d682e558f37953c38b091a5
4
+ data.tar.gz: e837a08996ffd4361aca70511494c5b447e02991
5
5
  SHA512:
6
- metadata.gz: ad8c78ec3f6501a84632732d9eb413477cf3d2ebfd428e59860eaf52bdb0d577ec70628918cfc84bef0b5c0c18f02343b26752680508c874cfccb37c383ed0b6
7
- data.tar.gz: b28e9ecaf8e1fc1278bc293019abe0e62284465e5cd83ceedf5d0767931114e309387804c1eab9b9393ada160254495ec83c5d441b2c6f7052cc3009250a8e87
6
+ metadata.gz: 74aec8800c026499dda2152b7888ee3d673b5360351478032f57380435ffddc9c588569a5fbb56d39e4b2f97fc4b065cb8341bb9e1b38005726e3e08ecadd4a8
7
+ data.tar.gz: 439a34480af8a5f705df9fbf4539e2fdb6f45810cbd79eefb899d80f2994dc01d5da29dbecdad326dcf451b42dbfd50d019635caad27d5a206185083a2a06b96
data/README.md CHANGED
@@ -33,17 +33,17 @@ Dither.ipog([[true, false],
33
33
 
34
34
  ```
35
35
 
36
- ATEG non-deterministic alogrithm for pairwise testing.
36
+ AETG non-deterministic alogrithm for pairwise testing.
37
37
  ```ruby
38
38
  require 'dither'
39
39
 
40
40
  # 2-way
41
- Dither.ateg([[true, false],
41
+ Dither.aetg([[true, false],
42
42
  [:cat, :dog, :mouse],
43
43
  (0...3).to_a])
44
44
 
45
45
  # 3-way
46
- Dither.ateg([[true, false],
46
+ Dither.aetg([[true, false],
47
47
  [true, false],
48
48
  [:cat, :dog, :mouse],
49
49
  (0...5).to_a],
data/dither.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  if RUBY_PLATFORM =~ /java/
24
24
  s.platform = "java"
25
25
  # compile dither-java on jdk 7
26
- files << "lib/dither-0.0.4.jar"
26
+ files << "lib/dither-0.1.0.jar"
27
27
  end
28
28
  s.files = files
29
29
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Dither
3
- module Ateg
3
+ module Aetg
4
4
 
5
5
  def run
6
6
  result = []
@@ -11,5 +11,5 @@ module Dither
11
11
  end
12
12
  result
13
13
  end
14
- end # Ateg
14
+ end # Aetg
15
15
  end # Dither
@@ -1,8 +1,8 @@
1
1
 
2
2
  module Dither
3
- module Ateg
3
+ module Aetg
4
4
  class Pairwise
5
- include Ateg
5
+ include Aetg
6
6
 
7
7
  attr_reader :scratch, :n, :random, :t, :params, :constraints, :pair_cache, :comb
8
8
 
@@ -13,10 +13,10 @@ module Dither
13
13
  raise Dither::Error.new(e.message)
14
14
  end
15
15
 
16
- def self.ateg(params, opts = {})
16
+ def self.aetg(params, opts = {})
17
17
  opts = DEFUALT_OPTS.dup.merge(opts)
18
18
  constraints = constraints_to_java(params.length, opts[:constraints])
19
- com.github.jesg.dither.Dither.ateg(
19
+ com.github.jesg.dither.Dither.aetg(
20
20
  opts[:t].to_java(:int),
21
21
  opts[:seed].to_java(:Integer),
22
22
  params.map(&:to_java).to_java,
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Dither
3
- VERSION = '0.0.15'
3
+ VERSION = '0.1.1'
4
4
  end
data/lib/dither.rb CHANGED
@@ -26,10 +26,12 @@ module Dither
26
26
  MIPOG.new(params, opts).run
27
27
  end
28
28
 
29
- def self.ateg(params, opts = {})
29
+ def self.aetg(params, opts = {})
30
30
  opts = DEFUALT_OPTS.dup.merge(opts)
31
- Ateg::Pairwise.new(params, opts).run
31
+ Aetg::Pairwise.new(params, opts).run
32
32
  end
33
+
34
+ class << self; alias_method :ateg, :aetg end
33
35
  end # Dither
34
36
 
35
37
  require 'dither/param'
@@ -39,12 +41,12 @@ require 'dither/ipog_helper'
39
41
  require 'dither/ipog'
40
42
  require 'dither/mipog'
41
43
  require 'dither/chinese_postman_problem'
42
- require 'dither/ateg'
43
- require 'dither/ateg_pairwise'
44
+ require 'dither/aetg'
45
+ require 'dither/aetg_pairwise'
44
46
 
45
47
  if RUBY_PLATFORM =~ /java/
46
48
  require 'java'
47
- require 'dither-0.0.4.jar'
49
+ require 'dither-0.1.0.jar'
48
50
 
49
51
  require 'dither/java_ext/dither'
50
52
  end
@@ -166,14 +166,15 @@ describe Dither do
166
166
  [0, 1, 1, 1]].to_set)
167
167
  end
168
168
 
169
- it 'can run 2-way ateg' do
169
+ it 'can run 2-way aetg' do
170
170
  params = [(0...2).to_a, (0...2).to_a, (0...2).to_a, (0..3).to_a]
171
+ Dither.aetg(params)
171
172
  Dither.ateg(params)
172
173
  end
173
174
 
174
- it 'can run 4-way ateg with seed' do
175
+ it 'can run 4-way aetg with seed' do
175
176
  params = [(0...2).to_a, (0...2).to_a, (0...2).to_a, (0..3).to_a]
176
- expect(Dither.ateg(params, :t => 4, :seed => 0, :constraints => [
177
+ expect(Dither.aetg(params, :t => 4, :seed => 0, :constraints => [
177
178
  { 0 => 1, 1 => 1, 2 => 1, 3 => 1 },
178
179
  ], :previously_tested => [[1,1,1,2]]).length).to eq 30
179
180
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dither
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Gowan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-27 00:00:00.000000000 Z
11
+ date: 2015-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -69,8 +69,8 @@ files:
69
69
  - Rakefile
70
70
  - dither.gemspec
71
71
  - lib/dither.rb
72
- - lib/dither/ateg.rb
73
- - lib/dither/ateg_pairwise.rb
72
+ - lib/dither/aetg.rb
73
+ - lib/dither/aetg_pairwise.rb
74
74
  - lib/dither/chinese_postman_problem.rb
75
75
  - lib/dither/ipog.rb
76
76
  - lib/dither/ipog_helper.rb