ravensat 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 430c194a8bc6d59ba234e117839a244c0ee4bb61b507615b1a12b1d52609013c
4
- data.tar.gz: e2090935ff06835501061059e47156889e13bc9afe7c3a57746958afe6c4abb0
3
+ metadata.gz: e53ca35aa21cc9c623de888c201c19d54146d586c34a549db7dab634e16ad3d6
4
+ data.tar.gz: bf87c8b08b9be42c7c9fbf7b1bddbfc88293ad266a8f190e1d8479e7131e1277
5
5
  SHA512:
6
- metadata.gz: 5500d691a90e8153d994db9c9fb0f5e4c0729232820fb41b7b6ddf1726a95090a783cf09c272e9459d139b2693effccb1c3e7e55625d15e269fc0595b5235327
7
- data.tar.gz: 2e9f44f44ef99640f370eb2329059438670b84e743729e8d4eaa19d585cc02bab17d506c45324971b2034cba7a41af890081f03803ebb7155fafced6d5c5725f
6
+ metadata.gz: b1e524ea817f9f6ab63892e9c608b6aea58d7b499dc0db5275d9634206680de45a1e2a22c0e19f78b6efaff5fd5e972a164dded7e19d1ffde10785e60e2c5156
7
+ data.tar.gz: 06a06b8914d6d654c127b4b36e94afe84cfbfe322f50717d3d3cbbfb1598e8726c05155ecf624b21fc765ac3e32b003ab0374f806555255499b31778c674a7b1
data/lib/ravensat/claw.rb CHANGED
@@ -5,6 +5,7 @@ module Ravensat
5
5
  end
6
6
 
7
7
  def self.pairwise_amo(bool_vars)
8
+ return bool_vars.first if bool_vars.size == 1
8
9
  bool_vars.combination(2).map do |e|
9
10
  e.map(&:~@).reduce(:|)
10
11
  end.reduce(:&)
@@ -12,6 +13,8 @@ module Ravensat
12
13
 
13
14
  # NOTE: Klieber, W. and Kwon, G.: Efficient CNF Encoding for Selecting 1 from N Objects (2007).
14
15
  def self.commander_amo(bool_vars)
16
+ return bool_vars.first if bool_vars.size == 1
17
+ # XXX: Operator unknown if bool_vars.size is very small.
15
18
  m = bool_vars.size / 2
16
19
  commander_variables = []
17
20
  formula = Ravensat::InitialNode.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ravensat
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravensat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - rikuto matsuda