change-space-instance | | space-instance
&key
allowed-unit-classes dimensions storage
=> space-instance | [Function]
|
Purpose
Change the dimensions, allowed unit classes, and storage of a
space instance.
Package :gbbopen
Module :gbbopen-core
Arguments and values
Returns
The space instance that was changed.
Events
When the allowed unit classes of space-instance are made more
restrictive, unit instances that are no longer allowed on the
space instance are removed from space-instance, signaling a
instance-removed-from-space-instance-event
for each removed unit
instance.
Detailed syntax
allowed-unit-classes ::= unit-classes-specifier
| nil |
|
dimension-type-specifier ::=
| :ordered |
(:ordered [ordered-comparison-type]) | |
| :enumerated |
(:enumerated [enumerated-comparison-type]) | |
| :boolean |
(:boolean [boolean-comparison-type]) |
|
ordered-comparison-type ::=
| number | fixnum |
short-float | single-float | |
| double-float | long-float | |
| pseudo-probability |
|
enumerated-comparison-type ::=
| eq | eql |
equal | equalp |
|
boolean-comparison-type ::=
| t |
|
unit-classes-specifier ::= | t |
single-unit-class-specifier
| ( single-unit-class-specifier+) |
|
single-unit-class-specifier ::=
| atomic-unit-class |
( atomic-unit-class subclassing-specifier) |
|
atomic-unit-class ::= | unit-class |
unit-class-name |
|
storage ::=
| ( unit-class-specifier dimension-names
storage-specification)* |
|
dimension-names ::= | dimension-name |
( dimension-name+) | t |
|
storage-specification ::=
| unstructured | |
| boolean | |
| uniform-buckets :layout
dimension-buckets-specification+ | |
| hashed [:size integer] |
|
dimension-buckets-specification ::=
| ( start-value end-value bucket-width) |
|
The default ordered-comparison-type, if unspecified, is
number
. The default enumerated-comparison-type,
if unspecified, is eql
. The default
boolean-comparison-type is t
.
Terms
dimension-name | | A symbol specifying a dimension
|
See also
make-space-instance
Examples
Change the storage of space instance (bb hyp)
to the
default unstructured storage for all unit instances:
> (change-space-instance '(bb hyps) :storage nil)
#<standard-space-instance (bb hyps)>
>
Now change it to store hyp
unit instances with uniform-bucket
storage for indexing in the x
and y
dimensions and hashed
storage in the classification
dimension:
> (change-space-instance '(bb hyps)
:storage '(((hyp :plus-subclasses) (x y)
uniform-buckets :layout ((0 10000 100)
(0 10000 100)))
((hyp :plus-subclasses) (classification)
hashed)))
#<standard-space-instance (bb hyps)>
>
Now change it to store only hyp
unit instances (no subclasses)
with uniform-bucket storage for indexing in the x
and y
dimensions and hashed storage in the classification
dimension:
> (change-space-instance '(bb hyps)
:allowed-unit-classes 'hyp
:storage '((hyp (x y)
uniform-buckets :layout ((0 10000 100)
(0 10000 100)))
(hyp (classification) hashed)))
#<standard-space-instance (bb hyps)>
>
Any unit instances that are subclasses of hyp
are removed from
the (bb hyps)
space instance by the above change in
allowed unit classes.
The GBBopen Project