module YPetri::Simulation::TransitionRepresentation::Type_S
Attributes
sparse_stoichiometry_vector[R]
Sparse stoichiometry vector corresponding to the free places.
sparse_sv[R]
Sparse stoichiometry vector corresponding to all the places.
stoichiometry[R]
Public Instance Methods
S?()
click to toggle source
True for stoichiometric transitions.
# File lib/y_petri/simulation/transition_representation/S.rb, line 21 def S? true end
Also aliased as: stoichiometric?
build_closure()
click to toggle source
Builds the S transition's function into a closure. Functions of S transitions return only a single number (flux for TS, firing for tS).
# File lib/y_petri/simulation/transition_representation/S.rb, line 49 def build_closure mv, f = simulation.m_vector, function λ = "-> { f.( %s ) }" % domain_access_code( vector: :mv ) eval λ end
init()
click to toggle source
Initialization subroutine.
Calls superclass method
YPetri::Simulation::TransitionRepresentation::Type_a#init
# File lib/y_petri/simulation/transition_representation/S.rb, line 35 def init super @stoichiometry = source.stoichiometry @sparse_stoichiometry_vector = Matrix.correspondence_matrix( codomain, free_places ) * stoichiometry.to_column_vector @sparse_sv = Matrix.correspondence_matrix( codomain, places ) * stoichiometry.to_column_vector end
s?()
click to toggle source
False for stoichiometric transitions.
# File lib/y_petri/simulation/transition_representation/S.rb, line 28 def s? false end
Also aliased as: nonstoichiometric?