ravensat 1.0.5 → 1.0.6
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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c1d5979a19db3adbe7a8541d669ace60880845f7ed0e399f915392102757b9
|
4
|
+
data.tar.gz: 3829e433c926fb89b6b75743301926b1aca1d9e411fed63e91757464d4601a81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f202c5196a0c611e965675341adcb889700814d0b80883a7adfecd86c10ce278f200afe0f99c4cf859a247391e60767c59f91b64aee7420ca33c42a03cd6455
|
7
|
+
data.tar.gz: e73fce1a7eb44ae778099cffba247f85b832f87ee4a602299800e474fe0d76fedb76267d31caa26314a9fa93d68d1976f34b2d0c9095fa0b390ec7b13ccf4305
|
data/lib/ravensat/claw.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
module Ravensat
|
2
2
|
module Claw
|
3
3
|
def self.alo(bool_vars)
|
4
|
+
return bool_vars.first if bool_vars.size == 1
|
4
5
|
bool_vars.reduce(:|)
|
5
6
|
end
|
6
7
|
|
7
8
|
def self.at_most_k(bool_vars, k)
|
9
|
+
return bool_vars.first if bool_vars.size == 1
|
8
10
|
bool_vars.combination(k+1).map do |e|
|
9
11
|
e.map(&:~@).reduce(:|)
|
10
12
|
end.reduce(:&)
|
11
13
|
end
|
12
14
|
|
13
15
|
def self.at_least_k(bool_vars, k)
|
16
|
+
return bool_vars.first if bool_vars.size == 1
|
14
17
|
bool_vars.combination(k-1).map do |e|
|
15
18
|
alo(bool_vars - e)
|
16
19
|
end.reduce(:&)
|
data/lib/ravensat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravensat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikuto matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|