with-changing-dimension-values |
| ( unit-instance) | [Macro] |
Purpose
Inform GBBopen that the dimension values of a
unit instance potentially will be changed by the evaluation of
forms.
Package :gbbopen
Module :gbbopen-core
Arguments and values
unit-instance | A unit instance | |
dimension-name | A symbol specifying a dimension of unit-instance | |
declaration | A declare expression (not evaluated) | |
forms | An implicit | |
results | The values returned by evaluating the last form |
Returns
The values returned by evaluating the last form.
Description
The locators for unit-instance are updated following the evaluation of
the last form. Any retrieval operations performed during the evaluation
of forms will use the
If dimension-names are specified, only the locators for those
dimensions of unit-instance will be checked and updated as
needed. If no
See also
check-instance-locators
Examples
Notify GBBopen that the x
, y
, and
belief
hyp
might be changed:
> (with-changing-dimension-values (hyp x y belief) (setf (location-of hyp) '(30 40)) (setf (belief-of hyp) 0.78)) 0.78 >Notify GBBopen that some dimension values of
hyp
might be
changed (less efficient than the above, if hyp
unit instances
have many dimensions):
> (with-changing-dimension-values (hyp) (setf (location-of hyp) '(36 52)) (incf (belief-of hyp) 0.05)) 0.83 >
The GBBopen Project
with-changing-dimension-values |