This is an old revision of the document!
Table of Contents
Extent visibility
When looking for matches, queries only consider Node that are in their set of visible extents.
An extent collects its nodes not by a single list, but by a number of (doubly linked) lists. Currently, 16 lists are used, but this can easily be changed. This feature is used to partition the extents. The 16 lists are called the extent indexes.
Extents are used by the query graph to access the nodes of the graph. In this process, nodes can be “hidden” to queries by being on a extent index non visible by the query scope (see RGG's extent index visibility). Non visible nodes are not visited and “ignored” by the queries, they are not visited at all (thus, efficient to speed up queries). For the RGG model graph, queries use only the seven first indexes by default. The default index usage is:
- 0 to 6: Default visibility - used by default in queries. Only these indexes are visible by default.
- 7: Meta data index.
- 8: Type graph data - used for the multi-scales.
- 9 to 15: Unused indexes - non visible by default.
Note: the index visibility is not used for the display. Thus, nodes on a “non” visible index are still displayed in the 3d view.
Default visibility
Every query whose visibility is not explicitly declared will use the default visibility. The default value for RGG models is 127 (i.e. 0b1111111).
The default extent visibility can be set with:
{de.grogra.rgg.model.Runtime.INSTANCE.currentGraph().setVisibleExtents( 0b1111111 );}
Explicit visibility declaration
It is also possible to change the extent visibility for only one query. The extent visibility can declared explicitly with: @ VAL ; QVDECL; QUERY where VAL is the visibility value. (QVDECL is the query variable declaration, and QUERY the query).
For example:
void rule() [ @5; A ==> B; // match all A in the extents 1, 2, and 3 @1; A ==> B; // match all A in the extent 1 A ==> B; // match all A in the default extents (i.e. 1 to 7) ] void meth(){ (* @21; F *); // match all F in the extents 1, 3, and 5 }
