Class Process

java.lang.Object
jline.lang.processes.Process
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MarkovChain, MarkovProcess

public abstract class Process extends Object implements Serializable
An abstract class for stochastic processes
See Also:
  • Field Details

  • Constructor Details

    • Process

      public Process(String name, int numParam)
      Creates a new process with the specified name and number of parameters.
      Parameters:
      name - the name of this process type
      numParam - the number of parameters required
  • Method Details

    • sample

      public abstract Object sample()
      Sample a value from the process
      Returns:
      sampled value
    • getName

      public String getName()
      Get the name of this process
      Returns:
      process name
    • getNumParams

      public int getNumParams()
      Get the number of parameters
      Returns:
      number of parameters
    • setParam

      public void setParam(int id, String paramName, Object paramValue)
      Set a parameter by id, name and value
      Parameters:
      id - parameter index (1-based)
      paramName - parameter name
      paramValue - parameter value
    • getParam

      public NamedParam getParam(int id)
      Get a parameter by id
      Parameters:
      id - parameter index (1-based)
      Returns:
      the named parameter
    • name

      public String name()
      Kotlin-style property alias for getName()
    • numParams

      public int numParams()
      Kotlin-style property alias for getNumParams()
    • param

      public NamedParam param(int id)
      Kotlin-style property alias for getParam(int id)