pairing_heap 3.1.2 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8389560b615ae5871d0adbae5a6b4e55554fa2df72e611e208a91352cdb3af28
4
- data.tar.gz: 130e2d0daa895cf7921e18dd736552de22bf6ac23aab8bbdb0c6a33536c2d5e9
3
+ metadata.gz: 0c7122d09fdfbcda744f2824df424af7634b2497594ecda22ec08a24b1372a91
4
+ data.tar.gz: 6e2a075da8593426c0bd893594d01bc3434036af94ca607cd6c1613fc9900272
5
5
  SHA512:
6
- metadata.gz: 6f2d1588a2de63ce23c96ee06af18983304798dd4d678e88e58a7ee09efafafe511adc8d33259ed17aee88fcba63726fa467fb6a79a7ce863dac25466137e4ec
7
- data.tar.gz: e972e7c8cd380c9374870c5b9232c1c307f3c723ba7672007f66e843d837482dd5e983d683eba29ef4e24aeaed839b8ab5f78cc382a0d6731de0f2fd393e716e
6
+ metadata.gz: b24f2b9386d50527877e19f1de73dfef77258ff2f9051704c33c7d3a93610322b67f7467ae85113870ce45246e63d282e97102bd98ce10978f0297858c2fd50e
7
+ data.tar.gz: abf622d8f59d67cdcf65fd6e96564877929e9a8979df5f98d417141ce2d3040d41a483f2f4abedb86e4bbcee832260714131f07f665563a035cfb18b33c1ff3e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pairing_heap (3.1.2)
4
+ pairing_heap (3.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -102,7 +102,7 @@ CHECKSUMS
102
102
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
103
103
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
104
104
  minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
105
- pairing_heap (3.1.2)
105
+ pairing_heap (3.1.3)
106
106
  parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
107
107
  parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
108
108
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ Rake::TestTask.new(:test) do |t|
13
13
  end
14
14
 
15
15
  task :rbs do
16
- sh "rbs validate sig/pairing_heap.rbs"
16
+ sh "rbs -I sig validate"
17
17
  end
18
18
 
19
19
  task default: %i[test standard rbs]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PairingHeap
4
- VERSION = "3.1.2"
4
+ VERSION = "3.1.3"
5
5
  end
data/sig/pairing_heap.rbs CHANGED
@@ -25,7 +25,7 @@ module PairingHeap
25
25
 
26
26
  # Returns the element and its priority at the top of the heap.
27
27
  # Time Complexity: O(1)
28
- def peek_with_priority: () -> [Elem, Priority] | [nil, nil]
28
+ def peek_with_priority: () -> ([Elem, Priority] | [nil, nil])
29
29
 
30
30
  # Time Complexity: O(1)
31
31
  def empty?: () -> bool
@@ -48,7 +48,7 @@ module PairingHeap
48
48
 
49
49
  # Removes element from the top of the heap and returns it along with its priority.
50
50
  # Time Complexity: O(N), Amortized: O(log N)
51
- def pop_with_priority: () -> [Elem, Priority] | [nil, nil]
51
+ def pop_with_priority: () -> ([Elem, Priority] | [nil, nil])
52
52
 
53
53
  # Changes a priority of element to a more prioritary one.
54
54
  # Time Complexity: O(1), Amortized: O(log N)
@@ -73,7 +73,7 @@ module PairingHeap
73
73
 
74
74
  # Returns [false, nil] if the element is not in heap, [true, priority] if it is.
75
75
  # Time Complexity: O(1)
76
- def get_priority_if_exists: (Elem elem) -> [false, nil] | [true, Priority]
76
+ def get_priority_if_exists: (Elem elem) -> ([false, nil] | [true, Priority])
77
77
 
78
78
  # Yields each element in the heap. No order guarantees.
79
79
  def each: () { (Elem) -> void } -> void
@@ -105,7 +105,7 @@ module PairingHeap
105
105
 
106
106
  # Returns the element and its priority at the top of the heap.
107
107
  # Time Complexity: O(1)
108
- def peek_with_priority: () -> [Elem, Priority] | [nil, nil]
108
+ def peek_with_priority: () -> ([Elem, Priority] | [nil, nil])
109
109
 
110
110
  # Time Complexity: O(1)
111
111
  def empty?: () -> bool
@@ -128,7 +128,7 @@ module PairingHeap
128
128
 
129
129
  # Removes element from the top of the heap and returns it along with its priority.
130
130
  # Time Complexity: O(N), Amortized: O(log N)
131
- def pop_with_priority: () -> [Elem, Priority] | [nil, nil]
131
+ def pop_with_priority: () -> ([Elem, Priority] | [nil, nil])
132
132
 
133
133
  # Yields each element in the heap. No order guarantees.
134
134
  def each: () { (Elem) -> void } -> void
@@ -146,7 +146,7 @@ module PairingHeap
146
146
  end
147
147
 
148
148
  # Priority queue where the smallest priority is the most prioritary
149
- class MinPriorityQueue[Elem, Priority < Comparable[Priority]] < PairingHeap[Elem, Priority]
149
+ class MinPriorityQueue[Elem, Priority < Comparable] < PairingHeap[Elem, Priority]
150
150
  def initialize: () -> void
151
151
 
152
152
  alias decrease_key change_priority
@@ -155,7 +155,7 @@ module PairingHeap
155
155
  end
156
156
 
157
157
  # Priority queue where the highest priority is the most prioritary
158
- class MaxPriorityQueue[Elem, Priority < Comparable[Priority]] < PairingHeap[Elem, Priority]
158
+ class MaxPriorityQueue[Elem, Priority < Comparable] < PairingHeap[Elem, Priority]
159
159
  def initialize: () -> void
160
160
 
161
161
  alias increase_key change_priority
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pairing_heap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Henryk Bartkowiak