Next: Number of Output Signals, Previous: Spur Perception, Up: Customizing the Relative Probability Function [Contents][Index]
Use the following functions to query or set spur weight denoted by W[i] in relative probability function formulas mentioned in Relative Probability Function Types.
If weight_p is not NULL
, the function qsmm_get_actor_spur_weight
sets *weight_p equal to weight for a spur type of an actor.
The value of *weight_p obtained in this way is always finite.
The function qsmm_set_actor_spur_weight
sets weight for a spur type of an actor to weight.
The argument actor specifies an actor handle.
The argument spur_type specifies a spur type and cannot be less than -1 or greater than or equal to the number of spur types returned by the function qsmm_get_actor_nspur
for the actor.
If the actor is the small one, specifying spur type -1 is incorrect.
If the actor is the large one, the functions query or set the weight of a corresponding spur type of a small actor associated with the large actor. Special spur type -1 of a large actor corresponds to the automatic spur of an associated small actor (i.e. its spur type 0).
On success, the functions return a non-negative value.
On failure, the functions return negative error code QSMM_ERR_INVAL
.
The following cases are failures:
qsmm_set_actor_spur_weight
);
nspur
of qsmm_actor_desc_s
structure when creating the actor.
The function qsmm_actor_create
initializes the weights of all spur types of a newly created actor to 1.
Next: Number of Output Signals, Previous: Spur Perception, Up: Customizing the Relative Probability Function [Contents][Index]