module YPetri::Simulation::TransitionRepresentation::Type_s

Public Instance Methods

S?() click to toggle source

False for non-stoichiometric transitions.

# File lib/y_petri/simulation/transition_representation/s.rb, line 11
def S?
  false
end
Also aliased as: stoichiometric?
build_closure() click to toggle source

Builds the s transition's function into a closure. Functions for s transitions (nonstoichiometric transitions) have return value arity equal to the codomain size. The returned closure here ensures that the return value is always of Array type.

# File lib/y_petri/simulation/transition_representation/s.rb, line 34
def build_closure
  mv, f = simulation.m_vector, function
  λ = "-> { Array f.( %s ) }" % domain_access_code( vector: :mv )
  eval λ
end
init() click to toggle source

Initialization subroutine.

# File lib/y_petri/simulation/transition_representation/s.rb, line 25
def init
  super
end
nonstoichiometric?()
Alias for: s?
s?() click to toggle source

True for stoichiometric transitions.

# File lib/y_petri/simulation/transition_representation/s.rb, line 18
def s?
  true
end
Also aliased as: nonstoichiometric?
stoichiometric?()
Alias for: S?