unduplicated-slot-namesGBBopen CoreLinkswith-changing-dimension-valuesGoTo Top

with-changing-dimension-values   (unit-instance [dimension-name*]) declaration* form* => result*[Macro]

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 progn of forms to be evaluated
results     The values returned by evaluating the last form

The values returned by evaluating the last form.

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 unit-instance locators as they existed before evaluation of the first form. Retrievals performed by separate threads also should be synchronized when using with-changing-dimension-values.

If dimension-names are specified, only the locators for those dimensions of unit-instance will be checked and updated as needed. If no dimension-names are specified, the values of any or all dimensions of unit-instance are assumed to have been potentially changed by forms.

See also

Notify GBBopen that the x, y, and belief dimension values of hyp might be changed:

  > (with-changing-dimension-values (hyp x y belief)
      (setf (location-of hyp) '(30 40))
      (setf (belief-of hyp) 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))

The GBBopen Project

unduplicated-slot-namesGBBopen CoreLinkswith-changing-dimension-valuesGoTo Top