Queries are used to query existing graphs for specific features. They are used to analyse the actual graph and search for a specific pattern.
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.
Internode
nodes, and print them out:
println( (* Internode *) )
Internode
nodes (with age 0):
(* i:Internode, (i[age] == 0) *)
Internode
nodes with diameter greater than 0.01:
(* i:Internode, (i[diameter] > 0.01) *)
F
with distance smaller than 1:
(* f:F, g:F, ( (f != g) && (distance(f, g) < 1) ) *)
Internode
nodes, connected to a Leaf
node with a branching edge:
(* Internode +> Leaf *)