ravensat 1.0.4 → 1.0.5

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: e53ca35aa21cc9c623de888c201c19d54146d586c34a549db7dab634e16ad3d6
4
- data.tar.gz: bf87c8b08b9be42c7c9fbf7b1bddbfc88293ad266a8f190e1d8479e7131e1277
3
+ metadata.gz: 56180e12d568856b7aecc556c6351157b35214ee2b8baccfbdf7069db9f87f11
4
+ data.tar.gz: 61d38033566cc2c5683300765589938e45e2a8140b9fc74646ca7cb9f838818a
5
5
  SHA512:
6
- metadata.gz: b1e524ea817f9f6ab63892e9c608b6aea58d7b499dc0db5275d9634206680de45a1e2a22c0e19f78b6efaff5fd5e972a164dded7e19d1ffde10785e60e2c5156
7
- data.tar.gz: 06a06b8914d6d654c127b4b36e94afe84cfbfe322f50717d3d3cbbfb1598e8726c05155ecf624b21fc765ac3e32b003ab0374f806555255499b31778c674a7b1
6
+ metadata.gz: 6ad53a3be42a987284db8d89f5e3fa4da21097e6c019c82e3fb34f49718b2907de49f9235922dd1892e318d94f193fba2b899b5317e5da780fceb1894cddbfb9
7
+ data.tar.gz: 38439434b8b7e40492743a7ee5b8815ffe71adfe8894ec678761c041af0e49db0f81e8ea684d5d3e4aef5288a68ff46796c871ccab9e9b349c424da3d0cdc500
data/lib/ravensat/claw.rb CHANGED
@@ -4,6 +4,18 @@ module Ravensat
4
4
  bool_vars.reduce(:|)
5
5
  end
6
6
 
7
+ def self.at_most_k(bool_vars, k)
8
+ bool_vars.combination(k+1).map do |e|
9
+ e.map(&:~@).reduce(:|)
10
+ end.reduce(:&)
11
+ end
12
+
13
+ def self.at_least_k(bool_vars, k)
14
+ bool_vars.combination(k-1).map do |e|
15
+ alo(bool_vars - e)
16
+ end.reduce(:&)
17
+ end
18
+
7
19
  def self.pairwise_amo(bool_vars)
8
20
  return bool_vars.first if bool_vars.size == 1
9
21
  bool_vars.combination(2).map do |e|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ravensat
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5"
5
5
  end
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
4
+ version: 1.0.5
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-18 00:00:00.000000000 Z
11
+ date: 2022-08-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: