S
- States classpublic final class TransitionsSet<S extends State> extends java.lang.Object implements JMarkovElement, Transitions<S>
Constructor and Description |
---|
TransitionsSet()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(S state,
double rate)
Adds a transition with the given state and rate.
|
boolean |
add(Transition<S> t) |
boolean |
add(Transitions<S> trans)
Adds all the given Transtions to the current set.
|
double |
addRate(S state,
double rate)
Adds the given rate to the transition to this state.
|
java.lang.String |
description()
This method return a complete verbal describtion of this element.
|
double |
getRate(S state)
Gets the rate for this state.
|
java.util.Iterator<Transition<S>> |
iterator()
Returns an iterator used to walk through the Transitions.
|
java.lang.String |
label()
This method returns a short String used in the user interface to describe
this element.
|
int |
size()
Returns the number of Transtions represented by this object.
|
java.lang.String |
toString()
This method returns a short String used in the user interface to describe
this element.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public boolean add(Transition<S> t)
add
in interface Transitions<S extends State>
t
- The trenasition to add.Transitions.add(jmarkov.basic.Transition)
public boolean add(Transitions<S> trans)
trans
- A collection of TransitionsSet.addAll(java.util.Collection)
public boolean add(S state, double rate)
add
in interface Transitions<S extends State>
state
- State the transition goes torate
- The rate at which this transition occurs.Transitions.add(State, double)
public double addRate(S state, double rate)
addRate
in interface Transitions<S extends State>
state
- rate
- public double getRate(S state)
getRate
in interface Transitions<S extends State>
state
- public int size()
Transitions
size
in interface Transitions<S extends State>
Set.size()
public java.lang.String label()
JMarkovElement
label
in interface JMarkovElement
JMarkovElement.description()
public java.lang.String description()
JMarkovElement
description
in interface JMarkovElement
JMarkovElement.label()
public final java.lang.String toString()
JMarkovElement
public final String toString() { return label(); }
toString
in interface JMarkovElement
toString
in class java.lang.Object
JMarkovElement.label()
public java.util.Iterator<Transition<S>> iterator()
iterator
in interface java.lang.Iterable<Transition<S extends State>>
Iterable.iterator()