Module: YPetri::Simulation::Transitions::Access
- Defined in:
- lib/y_petri/simulation/transitions/access.rb
Instance Method Summary collapse
-
#A_tt(ids = nil) ⇒ Object
Net’s A transitions.
-
#includes_transition?(id) ⇒ Boolean
(also: #include_transition?)
Does a transition belong to the simulation?.
-
#nA(ids = nil) ⇒ Object
Names of specified A transitions.
-
#nS(ids = nil) ⇒ Object
Names of specified S transitions.
-
#ns(ids = nil) ⇒ Object
Names of specified s transitions.
-
#nt(ids = nil) ⇒ Object
Names of specified t transitions.
-
#nT(ids = nil) ⇒ Object
Names of specified T transitions.
-
#ntS(ids = nil) ⇒ Object
Names of specified tS transitions.
-
#nTs(ids = nil) ⇒ Object
Names of specified Ts transitions.
-
#nTS(ids = nil) ⇒ Object
Names of specified TS transitions.
-
#nts(ids = nil) ⇒ Object
Names of specified ts transitions.
-
#S_tt(ids = nil) ⇒ Object
Net’s S transitions.
-
#s_tt(ids = nil) ⇒ Object
Net’s s (non-stoichiometric) transitions.
-
#t(id) ⇒ Object
Net’s transition.
-
#T_tt(ids = nil) ⇒ Object
Net’s T transitions.
-
#t_tt(ids = nil) ⇒ Object
Net’s t (timeless) transitions.
-
#tn(ids = nil) ⇒ Object
Names of specified transitions.
-
#TS_tt(ids = nil) ⇒ Object
Net’s TS transitions.
-
#Ts_tt(ids = nil) ⇒ Object
Net’s Ts transitions.
-
#ts_tt(ids = nil) ⇒ Object
Net’s ts transitions.
-
#tS_tt(ids = nil) ⇒ Object
Net’s tS transitions.
-
#tt(ids = nil) ⇒ Object
Net’s transitions.
Instance Method Details
#A_tt(ids = nil) ⇒ Object
Net’s A transitions.
56 57 58 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 56 def A_tt( ids=nil ) A_transitions( ids ).sources end |
#includes_transition?(id) ⇒ Boolean Also known as: include_transition?
Does a transition belong to the simulation?
9 10 11 12 13 14 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 9 def includes_transition?( id ) true.tap { begin; transition( id ) rescue NameError, TypeError return false end } end |
#nA(ids = nil) ⇒ Object
Names of specified A transitions.
117 118 119 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 117 def nA ids=nil A_tt( ids ).names( true ) end |
#nS(ids = nil) ⇒ Object
Names of specified S transitions.
123 124 125 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 123 def nS ids=nil S_tt( ids ).names( true ) end |
#ns(ids = nil) ⇒ Object
Names of specified s transitions.
129 130 131 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 129 def ns ids=nil s_tt( ids ).names( true ) end |
#nt(ids = nil) ⇒ Object
Names of specified t transitions.
141 142 143 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 141 def nt ids=nil t_tt( ids ).names( true ) end |
#nT(ids = nil) ⇒ Object
Names of specified T transitions.
135 136 137 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 135 def nT ids=nil T_tt( ids ).names( true ) end |
#ntS(ids = nil) ⇒ Object
Names of specified tS transitions.
99 100 101 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 99 def ntS ids=nil tS_tt( ids ).names( true ) end |
#nTs(ids = nil) ⇒ Object
Names of specified Ts transitions.
105 106 107 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 105 def nTs ids=nil Ts_tt( ids ).names( true ) end |
#nTS(ids = nil) ⇒ Object
Names of specified TS transitions.
111 112 113 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 111 def nTS ids=nil TS_tt( ids ).names( true ) end |
#nts(ids = nil) ⇒ Object
Names of specified ts transitions.
93 94 95 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 93 def nts ids=nil ts_tt( ids ).names( true ) end |
#S_tt(ids = nil) ⇒ Object
Net’s S transitions.
62 63 64 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 62 def S_tt( ids=nil ) S_transitions( ids ).sources end |
#s_tt(ids = nil) ⇒ Object
Net’s s (non-stoichiometric) transitions.
68 69 70 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 68 def s_tt( ids=nil ) s_transitions( ids ).sources end |
#t(id) ⇒ Object
Net’s transition.
19 20 21 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 19 def t( id ) transitions( id ).source end |
#T_tt(ids = nil) ⇒ Object
Net’s T transitions.
74 75 76 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 74 def T_tt( ids=nil ) T_transitions( ids ).sources end |
#t_tt(ids = nil) ⇒ Object
Net’s t (timeless) transitions.
80 81 82 83 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 80 def t_tt ids=nil return transitions.t if ids.nil? transitions.t.subset( ids ) end |
#tn(ids = nil) ⇒ Object
Names of specified transitions.
87 88 89 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 87 def tn ids=nil tt( ids ).names end |
#TS_tt(ids = nil) ⇒ Object
Net’s TS transitions.
50 51 52 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 50 def TS_tt( ids=nil ) TS_transitions( ids ).sources end |
#Ts_tt(ids = nil) ⇒ Object
Net’s Ts transitions.
44 45 46 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 44 def Ts_tt( ids=nil ) Ts_transitions( ids ).sources end |
#ts_tt(ids = nil) ⇒ Object
Net’s ts transitions.
31 32 33 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 31 def ts_tt( ids=nil ) ts_transitions( ids ).sources end |
#tS_tt(ids = nil) ⇒ Object
Net’s tS transitions.
37 38 39 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 37 def tS_tt( ids=nil ) tS_transitions( ids ).sources end |
#tt(ids = nil) ⇒ Object
Net’s transitions.
25 26 27 |
# File 'lib/y_petri/simulation/transitions/access.rb', line 25 def tt( ids=nil ) transitions( ids ).sources end |