<< Click to Display Table of Contents >> Navigation: Reference Manual > Node definitions > DSL_demorgan |
Header file: qualdef.h
class DSL_demorgan : public DSL_qualDef
DSL_demorgan derives from DSL_qualDef, and implements DeMorgan qualitative node. DeMorgan nodes are parametrized by a vector of parent weights and parent types, and by prior belief. These parameters are used to derive a complete conditional probability table (on demand, when inference algorithm requires one).
Parent weights are required to be in the [0..1] range. Parent types are integers. The following pre-processor defines are valid parent types:
DSL_DEMORGAN_INHIBITOR
DSL_DEMORGAN_REQUIREMENT
DSL_DEMORGAN_CAUSE
DSL_DEMORGAN_BARRIER
virtual int GetType() const;
Overridden method from DSL_nodeDef. Returns DSL_DEMORGAN.
virtual const char* GetTypeName() const;
Overridden method from DSL_nodeDef. Returns "DEMORGAN".
double GetPriorBelief() const;
Returns prior belief.
int SetPriorBelief(double value) const;
Sets prior belief. Returns DSL_OKAY on success, or a negative error code on failure.
double GetParentWeight(int parentIndex) const;
Returns a weight for a parent specified by parentIndex, or a negative number if parentIndex is invalid.
const DSL_doubleArray& GetParentWeights() const;
Returns a reference to an array containing parent weights.
int SetParentWeight(int parentIndex, double weight) const;
Sets weight for a parent specified by parentIndex. Returns DSL_OKAY on success, or a negative error code on failure.
int SetParentWeights(const DSL_doubleArray& weights);
Sets all parent weights. Returns DSL_OKAY on success, or a negative error code on failure. Fails when the size of the weights array is not equal to the number of parents or at least one element in the array is less than zero or greater than one.
int GetParentType(int parentIndex) const;
Returns parent type for a parent specified by parentIndex or a negative error code if parentIndex is invalid.
const DSL_intArray& GetParentTypes() const;
Returns a reference to an array containing parent types.
int SetParentType(int parentIndex, int parentType) const;
Sets parent type for a parent specified by parentIndex. Returns DSL_OKAY on success, or a negative error code on failure.
int SetParentTypes(const DSL_intArray& parentTypes);
Sets all parent types. Returns DSL_OKAY on success, or a negative error code on failure. Fails when the size of the parentTypes array is not equal to the number of parents, or at least one element in the array is an invalid parent type.
double GetTemporalParentWeight(int order, int parentIndex) const;
For a plate node in a DBN, gets the parent weight for a specified temporal order and parent index. Returns DSL_OKAY on success, or a negative error code on failure.
int SetTemporalParentWeight(int order, int parentIndex, double weight);
For a plate node in a DBN, sets the parent weight for a specified temporal order and parent index. Returns DSL_OKAY on success, or a negative error code on failure.
int GetTemporalParentType(int order, int parentIndex) const;
For a plate node in a DBN, gets the parent type for a specified temporal order and parent index. Returns DSL_OKAY on success, or a negative error code on failure.
int SetTemporalParentType(int order, int numParent, int parentType);
For a plate node in a DBN, sets the parent type for a specified temporal order and parent index. Returns DSL_OKAY on success, or a negative error code on failure.