<< Click to Display Table of Contents >> Navigation: Reference Manual > Node definitions > DSL_noisyAdder |
Header file: defnoisyadder.h
class DSL_noisyAdder : public DSL_ciDef
DSL_noisyAdder derives from DSL_ciDef and implements the Noisy-Adder parametrization. In addition to conditionally independent probabilities from DSL_ciDef, DSL_noisyAdder defines the distinguished outcome for itself and for each parent node. By default, each distinguished outcome is the last one. Each of the parents is also associated with the numeric weight, which is equal to 1 by default. The parametrization is converted to CPT on demand (see DSL_lazyDef) using one of two available algorithms, defined in the following class member enum:
enum Function { fun_average, fun_single_fault };
The average-type Noisy-Adder node calculates the CPT from the parameters by taking the average of probabilities of the effect given each of the causes in separation. The single fault type Noisy-Adder node assumes that only one of the parent nodes will be in the non-distinguished state.
virtual int GetType() const;
Overridden method from DSL_nodeDef. Returns DSL_NOISY_ADDER.
virtual const char* GetTypeName() const;
Overridden method from DSL_nodeDef. Returns "NOISY_ADDER".
Function GetFunction() const;
Gets the adder function.
int SetFunction(Function val);
Sets the adder function.
int GetDistinguishedState() const;
Returns the node's distinguished state.
int SetDistinguishedState(int thisState);
Sets the node's distinguished state.
int GetParentDistinguishedState(int parentIndex);
Returns the distinguished state for the parent specified by parentIndex, or a negative error code if parentIndex is invalid.
int SetParentDistinguishedState(int parentIndex, int newDState);
Sets the distinguished state to newDState for the parent specified by parentIndex. Returns DSL_OKAY on success, or a negative error code on failure.
double GetParentWeight(int parentIndex) const;
Returns the parent or leak weight. The leak weight is returned when parentIndex is is equal to the number of parents.
int SetParentWeight(int parentIndex, double value);
Sets the parent weight or, when parentIndex is equal to the number of parents, the leak weight. Returns DSL_OKAY on success, or a negative error code on failure.
int GetTemporalParentInfo(int order,
DSL_doubleArray &weights, DSL_intArray &distStates) const;
For a plate node in a DBN, gets parent weights and distinguished states for a specified temporal order. Returns DSL_OKAY on success, or a negative error code on failure.
int SetTemporalParentInfo(int order,
const DSL_doubleArray &weights, const DSL_intArray &distStates);
For a plate node in a DBN, sets parent weights and distinguished states for a specified temporal order. Returns DSL_OKAY on success, or a negative error code on failure.