instance-dimension-valueGBBopen Coreinstance-name-ofinstance-dimension-valuesGoTo Top

instance-dimension-values   unit-instance &optional dimension-names => dimension-values-alist[Function]

Purpose
Return dimension values of a unit instance.

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

unit-instance     A unit instance
dimension-names     A list of symbols naming dimensions of unit-instance or t, indicating all dimensions of unit-instance (default is t)
dimension-values-alist     An association list

Returns
An association list of dimension name and dimension value pairs.

Errors
A dimension name specified in dimension-names is not defined for unit-instance.

See also
    define-unit-class
    dimensions-of
    instance-dimension-value
    make-instance

Examples
Return all dimension values of the unit instance, hyp:

  > (instance-dimension-values hyp)
  ((belief . 0.85) (velocity-range 5 35) (color . :red)
   (classification :car :truck) (x . 1835) (y . 4791))
  >
Return the x and y dimension values of the unit instance, hyp:
  > (instance-dimension-values hyp '(x y))
  ((x . 1835) (y . 4791))
  >

Return all dimension values of the unit instance, word:

  > (instance-dimension-values word)
  ((character . "what's") (char-code 119 104 97 116 39 115))
  >

Note
Using instance-dimension-value is preferable to using instance-dimension-values when obtaining individual dimension values of a unit instance.


The GBBopen Project


instance-dimension-valueGBBopen Coreinstance-name-ofinstance-dimension-valuesGoTo Top