Module: YPetri::Simulation::Transitions::Type_S
Instance Method Summary collapse
-
#SM ⇒ Object
(also: #stoichiometry_matrix_all)
Returns the collection’s stoichiometry matrix versus all places.
-
#stoichiometry_matrix ⇒ Object
Returns the collection’s stoichiometry matrix versus free places.
Instance Method Details
#SM ⇒ Object Also known as: stoichiometry_matrix_all
Returns the collection’s stoichiometry matrix versus all places.
18 19 20 21 |
# File 'lib/y_petri/simulation/transitions/S.rb', line 18 def SM map( &:sparse_sv ) .reduce( Matrix.empty( places.size, 0 ), :join_right ) end |
#stoichiometry_matrix ⇒ Object
Returns the collection’s stoichiometry matrix versus free places.
11 12 13 14 |
# File 'lib/y_petri/simulation/transitions/S.rb', line 11 def stoichiometry_matrix map( &:sparse_stoichiometry_vector ) .reduce( Matrix.empty( places.free.size, 0 ), :join_right ) end |