jmarkov

## Class GeomState<Sub extends State>

- java.lang.Object
- - jmarkov.basic.State
  - - jmarkov.GeomState<Sub>

- Type Parameters:
    `Sub` - The sub-States class used.
  All Implemented Interfaces:
    java.lang.Comparable<State>, JMarkovElement

      public final class GeomState<Sub extends State>
      extends State

  The actual Geometric model is build using this class. The user normally does not have to manipulate this class.
  Author:
    Julio Góez, Germán Riaño. Universidad de los Andes. (C) 2005

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeomState(Sub subState, int level)` Creates a GeomState with the given level, ans subState.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(State s)` Compares GeomStates according to level first and then according to the subStates comparator.
    `void` | `computeMOPs(MarkovProcess mp)` This method should be implemented in order to compute all the measures of performance MOPs.
    `java.lang.String` | `description()` Returns a String that describes the State.
    `int` | `getLevel()`
    `double` | `getMOP(int index)` Gets the value of this MOP.
    `Sub` | `getSubState()`
    `boolean` | `isBoundary()`
    `boolean` | `isConsistent()` This method is called when a state is added to a set, if assertions are enabled.
    `java.lang.String` | `label()` Returns a (hopefully short) label that descibes the State.
    `int` | `setMOP(MarkovProcess mp, java.lang.String mopName, double value)` Sets the value of the MOP with this name.

    - ### Methods inherited from class jmarkov.basic.State

      `equals, getIndex, getMOP, setMOP, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GeomState

          public GeomState(Sub subState,
                   int level)

      Creates a GeomState with the given level, ans subState.
      Parameters:
        `level` -
        `subState` -

  - ### Method Detail

    - #### getLevel

          public int getLevel()

      Returns:
        Returns the level.

    - #### isBoundary

          public boolean isBoundary()

      Returns:
        tru if this state is level 0.

    - #### getSubState

          public Sub getSubState()

      Returns:
        Returns the subState.

    - #### compareTo

          public int compareTo(State s)

      Compares GeomStates according to level first and then according to the subStates comparator.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<State>`
      Specified by:
        `compareTo` in class `State`
      Parameters:
        `s` - state to compare to.
      Returns:
        A positive integer if this is grater then j, negative if this is less then j and 0 if this == j.
      See Also:
        `Comparable.compareTo(Object)`

    - #### computeMOPs

          public void computeMOPs(MarkovProcess mp)

      Description copied from class: `State`
      This method should be implemented in order to compute all the measures of performance MOPs. Inside it you should issue commands like `setMop("Utilization server 1", x, model);`. * For large models override this method as empty and rather override getMOP(int). Do NOT mix both approaches!!
      Specified by:
        `computeMOPs` in class `State`
      Parameters:
        `mp` - The model being solved.
      See Also:
        `State.computeMOPs(MarkovProcess)`

    - #### getMOP

          public double getMOP(int index)

      Description copied from class: `State`
      Gets the value of this MOP. The value should had been set via the setMOP method. Alternatively, for better performance define the MOP Names when implementing the MarkovProcess class and override this method. To define the names in the constructor call the method setMOPs(String[]). The index is the same as the one used in the array in the aforementioned method.
      Overrides:
        `getMOP` in class `State`
      Returns:
        The value of this MOP.
      See Also:
        `State.getMOP(int)`

    - #### label

          public java.lang.String label()

      Description copied from class: `State`
      Returns a (hopefully short) label that descibes the State. It is used by all print methods and in the GUI.
      Specified by:
        `label` in interface `JMarkovElement`
      Specified by:
        `label` in class `State`
      Returns:
        A shor String label that identifies the state.
      See Also:
        `State.label()`

    - #### setMOP

          public int setMOP(MarkovProcess mp,
                   java.lang.String mopName,
                   double value)

      Description copied from class: `State`
      Sets the value of the MOP with this name. If no MOP with this name exists a new one is declared.
      Overrides:
        `setMOP` in class `State`
      Parameters:
        `mp` - The model being solved.
      Returns:
        the index where it was added.
      See Also:
        `State.setMOP(MarkovProcess,java.lang.String, double)`

    - #### description

          public java.lang.String description()

      Description copied from class: `State`
      Returns a String that describes the State. By default it is an empty string, but you should implement it in order to get a meaningful description.
      Specified by:
        `description` in interface `JMarkovElement`
      Overrides:
        `description` in class `State`
      Returns:
        A String description of the State
      See Also:
        `JMarkovElement.label()`

    - #### isConsistent

          public boolean isConsistent()

      Description copied from class: `State`
      This method is called when a state is added to a set, if assertions are enabled. You should include code that checks the consistency of the paprameters entered. It is very helpful during depelopment. Once assertions are disabled, this will not reduce the speed of your program.
      Specified by:
        `isConsistent` in class `State`
      Returns:
        true if the state is consistent.
      See Also:
        `State.isConsistent()`