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 +4 -4
- data/lib/ravensat/claw.rb +3 -0
- data/lib/ravensat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e53ca35aa21cc9c623de888c201c19d54146d586c34a549db7dab634e16ad3d6
|
4
|
+
data.tar.gz: bf87c8b08b9be42c7c9fbf7b1bddbfc88293ad266a8f190e1d8479e7131e1277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/ravensat/version.rb
CHANGED