petrinet 0.1.0 → 0.1.1

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: ca5cb3389ec8322e7851cf937e15b1d7fef235b22f88f2897f5eba513bb3231e
4
- data.tar.gz: 71ff8229ac9063bc50ec0fb4bf1b163c9dd9d40ac51c2ed21f53c53ebdabfd67
3
+ metadata.gz: 0b518d19f184691dadef983c9baa2938cdcd8e765a53315f106f8d6085da885c
4
+ data.tar.gz: 0c6f0b7f6c857d7dac35818d995b6ddd0579f4cbeb32d5d357ae6f0f07b53092
5
5
  SHA512:
6
- metadata.gz: ed35c9308bfc520d96f40fdd4a63e7294d9996d0d0bc1eaabc30be003af2ffead875dc2c763ed8644303984dd4e7ad5e0d8e3a65b048efc8694ac0a6aea6e68b
7
- data.tar.gz: c3626f4573b6ea2ad70605103c2d165ef7299c5421b2c24d28c72693708a6ee0dab8349accac37246cce1d6704babc7ab39964285b6fef7111190186054cb14c
6
+ metadata.gz: e538872fba3b61159b285304af811824e46a650566cae1815f04fafe6ba6c0c65dd08cc9b149fcd4235306bfdcc3921adba16b86d25aeafb0aaa336649a93a01
7
+ data.tar.gz: 7a6996c8eaad4e18d8f649615489b0573ec747f631ea751d3791cfa7d3f961a9ee1589126bad5f937db62d8a6603d07ab60ec738a8472e6fa5e1544765fae194
@@ -118,10 +118,9 @@ module Petrinet
118
118
  end
119
119
 
120
120
  def net
121
- place_index_by_place_name = Hash.new do |h, k|
122
- index = h.size
123
- @state_vector[index] = 0
124
- h[k] = index
121
+ place_index_by_place_name = Hash.new
122
+ @place_names.sort.each_with_index do |place_name, index|
123
+ place_index_by_place_name[place_name] = index
125
124
  end
126
125
 
127
126
  transition_vectors_by_transition_name_pairs = @transition_by_name.map do |transition_name, transition|
@@ -1,3 +1,3 @@
1
1
  module Petrinet
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petrinet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-03 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri