User Tools

Site Tools


xl_programming_language:queries

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

  • Find all Internode nodes, and print them out:

println( (* Internode *) )

  • Find all newly created Internode nodes (with age 0):

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

  • Search for all Internode nodes with diameter greater than 0.01:

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

  • Find all pairs of segments F with distance smaller than 1:

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

  • Find all Internode nodes, connected to a Leaf node with a branching edge:

(* Internode +> Leaf *)

xl_programming_language/queries.txt · Last modified: 2024/03/11 11:05 by ksmolen