Class NumberedDFNode
Numbered discrete function node.
Note: Return and argument types for methods in this class vary depending on the particular API DLL (x86/x64 platform, single/double precision) being used. Please read the section Using the Hugin C#/.NET Core/.NET 5/.NET 6 API.
Inherited Members
Namespace: HAPI
Assembly: hugincs-9.7-netstandard2.0-x64.dll
Syntax
public class NumberedDFNode : DiscreteFunctionNode, ICloneable, NumericDiscreteNode
Remarks
Each state of a NumberedDFNode represents a number.
Constructors
NumberedDFNode(DiscreteFunctionNode)
Constructs a new NumberedDFNode object corresponding to
the given DiscreteFunctionNode object node.
Declaration
public NumberedDFNode(DiscreteFunctionNode node)
Parameters
| Type | Name | Description |
|---|---|---|
| DiscreteFunctionNode | node | The DiscreteFunctionNode to be converted. |
Remarks
The new object is identical to node
except that it will be a "numbered" function node. As a
side-effect, node dies (that is, becomes
"not-alive"). And if node is an output
node, then all output clones associated with the node also die.
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |
NumberedDFNode(NetworkModel)
Constructs a new NumberedDFNode.
Declaration
public NumberedDFNode(NetworkModel belongsTo)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkModel | belongsTo |
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |
Methods
GetQuantile(double)
Returns the quantile corresponding to the specified
probability argument of the inverse cumulative
distribution function.
Declaration
public double GetQuantile(double probability)
Parameters
| Type | Name | Description |
|---|---|---|
| double | probability |
Returns
| Type | Description |
|---|---|
| double |
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |
GetStateIndex(double)
Returns the index of the state matching the specified value.
Declaration
public long GetStateIndex(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The state value of the state to be searched for. |
Returns
| Type | Description |
|---|---|
| long | The index of the state with the specified state value. |
Remarks
If there is no (unique) state with the specified state value, -1 is returned.
Generic declaration:
public h_index_t GetStateIndex (double value)
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |
GetStateValue(ulong)
Returns the value associated with a particular state of this NumberedDFNode.
Declaration
public double GetStateValue(ulong s)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | s | The index of the state in question. |
Returns
| Type | Description |
|---|---|
| double |
Remarks
Generic declaration:
public double GetStateValue (size_t s)
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |
SetStateValue(ulong, double)
Sets the value associated with a particular state of this NumberedDFNode.
Declaration
public void SetStateValue(ulong s, double v)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | s | The index of the state in question. |
| double | v | The new value for state |
Remarks
Generic declaration:
public void SetStateValue (size_t s, double v)
Exceptions
| Type | Condition |
|---|---|
| ExceptionHugin |