![]() | ![]() | ![]() | make-space-instance | ![]() |
|
| path
&rest initargs &key allowed-unit-classes dimensions storage
make-parents class => space-instance | [Function] |
Purpose
Create a new space instance.
Package :gbbopen
Module :gbbopen-core
Arguments and values
| path | A space-instance path specifying the location in the blackboard repository where the new space instance is to be created | |
| initargs | An initialization argument list | |
| allowed-unit-classes | An extended unit-classes specification
or nil (see below; default is t)
| |
| dimensions | A list of (dimension-name
dimension-type-specifier) pairs (default is nil)
| |
| storage | A storage specification
(see below; default is (t t unstructured) or nil if
allowed-unit-classes is nil)
| |
| make-parents | A generalized boolean (default is nil)
| |
| class | The name of the space class for the created
space instance (default is standard-space-instance)
| |
| space-instance | A space instance |
Returns
The created space instance.
Events
When a space instance is created, events are signaled in the
following sequence:
update-nonlink-slot-event or
link-event is signaled for each slot in
the newly created space instance. A link-event
is also signaled for each inverse pointer from an existing
space instance or unit instance to the newly created
space instance.
add-instance-to-space-instance-event is signaled
for each space instance on which the newly created
space instance is added.
create-instance-event is signaled.
Errors
Use of an initialization argument that has not been declared as valid.
The supplied or generated instance name is identical to the instance name of an existing unit instance of class.
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 |
Description
Specifying a :space-instances initialization argument
causes that value to be used instead of any :initial-space-instances
specification associated with the space class. However, note that
placing a space instance on other space instances is unrelated
to the layout of blackboard repository hierarchy, which is specified
by the :paths initialization argument. Placing a
space instance on other space instances is no different from
placing any other unit instance on a space instance.
See also
allowed-unit-classes-of
change-space-instance
children-of
define-space-class
delete-all-space-instances
delete-space-instance
describe-instance
describe-space-instance
describe-space-instance-storage
dimensions-of
make-instance
parent-of
Examples
Create a top-level space instance, bb,
that cannot store any unit instances:
> (make-space-instance '(bb)
:allowed-unit-classes nil)
#<standard-space-instance (bb)>
>
Now create a space instance for hyp unit instances,
named hyps, as a child of bb, with uniform, 100-wide, bucket
storage for indexing unit instances with dimensional values between
0–10,000 in the x and y dimensions:
> (make-space-instance '(bb hyps)
:dimensions (dimensions-of 'hyp)
:allowed-unit-classes '((hyp :plus-subclasses))
:storage '(((hyp :plus-subclasses) (x y)
uniform-buckets :layout ((0 10000 100)
(0 10000 100)))))
#<standard-space-instance (bb hyps)>
>
Here is an improved space instance for hyp
unit instances named hyps, with both uniform-bucket storage for
indexing in the x and y dimensions and hashed storage to
retrieve match candidates via classification dimensional values:
> (make-space-instance '(bb hyps)
:dimensions (dimensions-of 'hyp)
:allowed-unit-classes '((hyp :plus-subclasses))
: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)>
>
Note
The make-space-instance function is equivalent to using
make-instance with the desired space class and
with the initialization argument :instance-name containing the
space-instance path. However, using make-space-instance
provides a convenient shorthand and is preferable stylistically.
The GBBopen Project
![]() | ![]() | ![]() | make-space-instance | ![]() |