Model
public class Model
A Model is a compact description of a table. A model consists of a
list of discrete nodes and a set of expressions (one expression per
configuration of states of the nodes.
-
Is this
Modelobject alive?Declaration
Swift
public func isAlive() -> Bool -
Deletes this
Model.Declaration
Swift
public func delete() throws -
Returns the number of configurations of the
Nodes of thisModel.Declaration
Swift
public func getSize() throws -> Int -
Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents.
When generating the conditional probability table for a node with interval nodes as parents, a number of values are taken within each bounded interval of an interval parent. By default, the interval is divided into 25 subintervals, and the midpoints of these subintervals are then used in the computation of the value of the child.
Declaration
Swift
public func setNumberOfSamplesPerInterval (_ count: Int) throwsParameters
countthe number of subintervals.
-
Returns the number of values per interval used when generating the conditional probability table for a node with interval parents.
Declaration
Swift
public func getNumberOfSamplesPerInterval() throws -> IntReturn Value
An integer.
-
Associates an expression (specified as a
String) with a specific configuration of the nodes of thisModel.Declaration
Swift
public func setExpression (_ index: Int, _ expression: String?) throwsParameters
indexindex of the state configuration of the nodes of the model.
expressiona textual representation of the expression to set for the specified configuration;
nilmeans that the existing expression will be deleted. -
Returns the expression (as a
String) associated with a specific configuration of the nodes of thisModel.Declaration
Swift
public func getExpressionAsString(_ index: Int) throws -> String?Parameters
indexindex of the state configuration of the nodes of the model.
Return Value
a textual representation of the expression stored at the specified configuration;
nilmeans that no expression has been stored at the specified configuration.
Model Class Reference