stream-ofStreamingstream-linkstream-instances-on-space-instancesGoTo Top

stream-instances-on-space-instances   unit-classes-specifier space-instances streamer &key pattern filter-before filter-after use-marking verbose[Function]

Purpose
Write unit instances on space instances, optionally selected by a retrieval pattern, to a streamer.

Package   :gbbopen

Module   :streaming

Arguments and values

unit-classes-specifier     An extended unit-classes specification (see below)
space-instances     A space instance, a list of space instances, a space-instance path regular expression, or t (indicating all space instances)
streamer     A streamer
pattern     A retrieval pattern (see below; default is t)
filter-before     A single-argument predicate to be applied before pattern-matching tests occur
filter-after     A single-argument predicate to be applied after pattern-matching tests occur
use-marking     A generalized boolean (default is *use-marking*)
verbose     A generalized boolean (default is *find-verbose*)

Detailed syntax

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
subclassing-specifier ::= :plus-subclasses | :no-subclasses | + | =

The shorthand + subclasses specifier is equivalent to :plus-subclasses and = to :no-subclasses.

pattern ::= subpattern | t | :all
subpattern ::= pattern-element |
(not subpattern) |
(and subpattern*) |
(or subpattern*)
pattern-element ::= (pattern-op dimension-names pattern-values option*) |
(boolean-dimension-unary-pattern-op dimension-names option*)
pattern-op ::= ordered-dimension-pattern-op |
enumerated-dimension-pattern-op |
boolean-dimension-binary-pattern-op
ordered-dimension-pattern-op ::= ordered-dimension-any-numeric-value-pattern-op |
ordered-dimension-explicit-type-pattern-op
ordered-dimension-explicit-type-pattern-op ::= ordered-dimension-fixnum-pattern-op |
ordered-dimension-short-float-pattern-op |
ordered-dimension-single-float-pattern-op |
ordered-dimension-double-float-pattern-op |
ordered-dimension-long-float-pattern-op |
ordered-dimension-pseudo-probability-pattern-op
ordered-dimension-any-numeric-value-pattern-op ::= < | <= | >= | > | = | /= |
within | covers | overlaps |
abuts | starts | ends
ordered-dimension-fixnum-pattern-op ::= <& | <=& | >=& | >& | =& | /=& |
within& | covers& | overlaps& |
abuts& | starts& | ends&
ordered-dimension-short-float-pattern-op ::= <$& | <=$& | >=$& | >$& | =$& | /=$& |
within$& | covers$& | overlaps$& |
abuts$& | starts$& | ends$&
ordered-dimension-single-float-pattern-op ::= <$ | <=$ | >=$ | >$ | =$ | /=$ |
within$ | covers$ | overlaps$ |
abuts$ | starts$ | ends$
ordered-dimension-double-float-pattern-op ::= <$$ | <=$$ | >=$$ | >$$ | =$$ | /=$$ |
within$$ | covers$$ | overlaps$$ |
abuts$$ | starts$$ | ends$$
ordered-dimension-long-float-pattern-op ::= <$$$ | <=$$$ | >=$$$ | >$$$ | =$$$ | /=$$$ |
within$$$ | covers$$$ | overlaps$$$ |
abuts$$$ | starts$$$ | ends$$$
ordered-dimension-pseudo-probability-pattern-op ::= <% | <=% | >=% | >% | =% | /=% |
within% | covers% | overlaps% |
abuts% | starts% | ends%
enumerated-dimension-pattern-op ::= is | enumerated-dimension-explicit-test-pattern-op
enumerated-dimension-explicit-test-pattern-op ::= is-eq | is-eql | is-equal | is-equalp
boolean-dimension-binary-pattern-op ::= eqv
boolean-dimension-unary-pattern-op ::= true | false
dimension-names ::= dimension-name | (dimension-name+)
pattern-values ::= pattern-value |
(pattern-value+) |
(pattern-value+ . pattern-value) |
#(pattern-value+)
pattern-value ::= point | interval | element | set
interval ::= (start end) | (start . end) | #(start end)

Terms

point A number, infinity, or -infinity
start A number or -infinity
end A number or infinity
element    An object

Description
A unit instance will be streamed only once, even if the unit instance resides on multiple space instances.

The pattern t matches all unit instances whose dimension values overlap the dimensional extent of at least one space instance in space-instances. The pattern :all matches every unit instance on a space instance in space-instances, regardless of dimensional overlap.

Declared numeric and pseudo probability pattern operators are also supported, for example: =&, =$&, =$, =$$, =$$$, and =% and within&, within$&, within$, within$$, within$$$, and within%.

See also
    stream-add-instance-to-space-instance
    stream-delete-instance
    stream-instance
    stream-instances
    stream-instances-of-class
    stream-remove-instance-from-space-instance

Example
Stream all unit instances of the unit class hyp to streamer *streamer* that reside on the (bb probable-hyps) space instance that have a belief value greater than 0.5:

  (stream-instances-on-space-instances 'hyp '(bb probable-hyps) *streamer* 
     :pattern '(> belief .5))

Note
Fixnum overlaps comparisons can result in bignum computations if the combined intervals of the pattern and a candidate unit instance exceeds most-positive-fixnum.


The GBBopen Project


stream-ofStreamingstream-linkstream-instances-on-space-instancesGoTo Top