Table of Contents

Graph queries in XL

Description

Queries are used to query existing graphs for specific features. They are used to analyse the actual graph and search for a specific pattern.

XL syntax

Queries are enclosed in asterisked parenthesis: (* *)

The elements are given in their expected order. For example, (* Internode Internode Apex *) searches for a subgraph which consists of a sequence of nodes of the types Internode Internode Apex, connected by successor edges.

Examples

println( (* Internode *) )

(* i:Internode, (i[age] == 0) *)

(* i:Internode, (i[diameter] > 0.01) *)

(* f:F, g:F, ( (f != g) && (distance(f, g) < 1) ) *)

(* Internode +> Leaf *)