Package jline.lang.processes
Class Process
java.lang.Object
jline.lang.processes.Process
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MarkovChain,MarkovProcess
An abstract class for stochastic processes
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of this processintGet the number of parametersgetParam(int id) Get a parameter by idname()Kotlin-style property alias for getName()intKotlin-style property alias for getNumParams()param(int id) Kotlin-style property alias for getParam(int id)abstract Objectsample()Sample a value from the processvoidSet a parameter by id, name and value
-
Field Details
-
name
-
params
-
-
Constructor Details
-
Process
Creates a new process with the specified name and number of parameters.- Parameters:
name- the name of this process typenumParam- the number of parameters required
-
-
Method Details
-
sample
Sample a value from the process- Returns:
- sampled value
-
getName
Get the name of this process- Returns:
- process name
-
getNumParams
public int getNumParams()Get the number of parameters- Returns:
- number of parameters
-
setParam
Set a parameter by id, name and value- Parameters:
id- parameter index (1-based)paramName- parameter nameparamValue- parameter value
-
getParam
Get a parameter by id- Parameters:
id- parameter index (1-based)- Returns:
- the named parameter
-
name
Kotlin-style property alias for getName() -
numParams
public int numParams()Kotlin-style property alias for getNumParams() -
param
Kotlin-style property alias for getParam(int id)
-