describe-unit-classGBBopen Coredirect-nonlink-slot-definitiondimensions-ofGoTo Top

dimensions-of   space-instance-or-unit-classes-specifier => dimension-specifications-list[Generic Function]

Purpose
Return the dimension specifications of a space instance or one or more unit classes.

Method signatures

dimensions-of  (space-instance standard-space-instance) => dimension-specifications-list
dimensions-of  (unit-classes-specifier cons) => dimension-specifications-list
dimensions-of  (unit-class standard-unit-class) => dimension-specifications-list

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

space-instance-or-unit-classes-specifier     A space instance, an extended unit-classes specification or a list of extended unit-classes specifications
dimension-specifications-list     A proper list

Returns
A list of (dimension-name (dimension-type comparison-type)) pairs.

See also
    define-unit-class
    make-space-instance
    instance-dimension-value
    instance-dimension-values

Examples
Return the dimensions defined for instances of unit class hyp:

  > (dimensions-of 'hyp)
  ((x (:ordered fixnum)) (y (:ordered fixnum)) (belief (:ordered number))
   (velocity-range (:ordered number)) (color (:enumerated eq)) 
   (classification (:enumerated eq)))
  >
Return the dimensions of the (bb hyps) space instance:
  > (dimensions-of (find-space-instance-by-path '(bb hyps)))
  ((x (:ordered fixnum)) (y (:ordered fixnum)) (belief (:ordered number))
   (velocity-range (:ordered number)) (color (:enumerated eq)) 
   (classification (:enumerated eq)))
  >

Note that the dimensions of a space instance (its dimensional extent as a container for other unit instances) is independent of any dimension values that the space instance might have as a unit instance:

  > (instance-dimension-values (class-of (find-space-instance-by-path '(bb hyps))))
  nil
  >
or the dimensions that the unit class of the space instance might have:
  > (dimensions-of (class-of (find-space-instance-by-path '(bb hyps))))
  nil
  >

Note
The returned list of dimension specifications for a space instance or for a unit class should not be destructively altered.


The GBBopen Project


describe-unit-classGBBopen Coredirect-nonlink-slot-definitiondimensions-ofGoTo Top