jmarkov.basic

## Interface Transitions<S extends State>

- Type Parameters:
    `S` -
  All Superinterfaces:
    java.lang.Iterable<Transition<S>>, JMarkovElement
  All Known Implementing Classes:
    TransitionsSet

      public interface Transitions<S extends State>
      extends JMarkovElement, java.lang.Iterable<Transition<S>>

  Author:
    German Riano. Universidad de los Andes. (C) 2006

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(S state, double rate)` Adds a ne transition to the given state
    `boolean` | `add(Transition<S> t)`
    `double` | `addRate(S state, double rate)` Adds the given rate to the transition to this state.
    `double` | `getRate(S state)` Gets the rate for this state.
    `int` | `size()` Returns the number of Transtions represented by this object.

    - ### Methods inherited from interface jmarkov.basic.JMarkovElement

      `description, equals, label, toString`

    - ### Methods inherited from interface java.lang.Iterable

      `iterator`

- - ### Method Detail

    - #### add

          boolean add(Transition<S> t)

      Parameters:
        `t` - The trenasition to add.
      Returns:
        true of the element was already in the set.

    - #### add

          boolean add(S state,
                    double rate)

      Adds a ne transition to the given state
      Parameters:
        `state` - State the transition goes to
        `rate` - The rate at which this transition occurs.
      Returns:
        true if the state was already on the set.

    - #### addRate

          double addRate(S state,
                       double rate)

      Adds the given rate to the transition to this state.
      Parameters:
        `state` -
        `rate` -
      Returns:
        The old value associated with this state.

    - #### getRate

          double getRate(S state)

      Gets the rate for this state. It returns 0.0 if this state is not in the Transitions.
      Parameters:
        `state` -
      Returns:
        The rate for this state

    - #### size

          int size()

      Returns the number of Transtions represented by this object.
      Returns:
        The number of Transitions.
      See Also:
        `Set.size()`