Next: , Previous: , Up: Adaptive Probabilistic Mapping   [Contents][Index]


2.5 Incrementing Spur

The value of the spur of given type an actor keeps track of can be incremented using the following function.

Function: int qsmm_actor_spur_delta (qsmm_actor_t actor, int spur_type, double spur_delta)

This function increments by spur_delta the value of the spur of type spur_type an actor has been accumulating. Spur types, the number of which was specified when creating the actor, have zero-based indices. Special spur type -1 of a large actor corresponds to the automatic spur of a small actor associated with the large actor. The value of spur_delta can be negative.

On success, a non-negative value is returned. If the actor is the small one and spur_type is negative, or if the actor is the large one and spur_type is less than -1, or if spur_type is greater than or equal to the number of spur types specified when creating the actor, or if spur_delta is non-finite, or if the incremented value of the spur becomes non-finite, then no increment will be performed and negative error code QSMM_ERR_INVAL will be returned.

To get the current value of the spur of given type an actor keeps track of, the following function can be used.

Function: int qsmm_get_actor_spur (qsmm_actor_t actor, int spur_type, double *spur_p)

This function sets *spur_p to a current value of the spur of type spur_type an actor has been accumulating. Spur types, the number of which was specified when creating the actor, have zero-based indices. Special spur type -1 of a large actor corresponds to the automatic spur of a small actor associated with the large actor. If spur_p is NULL, then *spur_p will not be set, otherwise *spur_p will always be finite.

On success, a non-negative value is returned. If the actor is the small one and spur_type is negative, or if the actor is the large one and spur_type is less than -1, or if spur_type is greater than or equal to the number of spur types specified when creating the actor, then negative error code QSMM_ERR_INVAL will be returned.


Next: , Previous: , Up: Adaptive Probabilistic Mapping   [Contents][Index]