tutorials:common_graph_queries
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:common_graph_queries [2024/10/11 11:10] – tim | tutorials:common_graph_queries [2025/01/10 11:42] (current) – removed gaetan | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | see also: [[xl_programming_language: | ||
- | In the following a set queries is listed and the results of them applied on the graph in the image. This graph is created by the turtle query: '' | ||
- | |||
- | {{: | ||
- | |||
- | |Query | Result | Description | | ||
- | |**Basic** ||| | ||
- | |A or a:A | {a1, | ||
- | |a: | ||
- | |**Node based path pattern** ||| | ||
- | |(* A F *) A | {a3} | direct combination of nodes | | ||
- | |(* F *) A | {a2,a3,a4} | other example | | ||
- | |**Edge based path pattern** ||| | ||
- | |**ANY_EDGE** ||| | ||
- | | %%(* A --> *) F %% | {f1,f2} | next node | | ||
- | | %%A (*<-- F*) %% | {a2,a3,a4} | prev node | | ||
- | | %%(* F -- *) A %% | {a1, | ||
- | |**SUCCESSOR_EDGE** ||| | ||
- | | %%(* A > *) F %% | {f2} | next node | | ||
- | | %%A (* < F *) %% | {a2,a3,a4} | prev node | | ||
- | | %%(* F --- *) A %% | {a1, | ||
- | |**BRANCH_EDGE** ||| | ||
- | | %%(*A +>*) F %% | {f1} | next node | | ||
- | | %%A (* <+ F *) %% | {} | prev node | | ||
- | | %%(*F -+- *) A %% | {a1} | undirected | | ||
- | |**Single Match, Late Match and Optional Patterns** ||| | ||
- | | %%A (: --> F)%% | {f1} | find first pattern | | ||
- | | %%A (& --> F)%% | {f1} | find last pattern | | ||
- | | %%A (? +> F)%% | {Null} | changes nothing to NULL | | ||
- | |**Transitive closures** ||| | ||
- | | %%(* A > > *) A %% | {a3} | Path described by single edges | | ||
- | | %%(* A +> > *) A %% | {a2} | other example | | ||
- | | %%(* A (-->)* *) A %% | {a1, | ||
- | | %%(* A (-->)+ *) A %% | {a2,a3,a4} | (1-to-n edges possible) | | ||
- | | %%(* A (-->)? *) F %% | {f1,f2} | (0-to-1 edges possible) | | ||
- | | %%(* A (-->){2} *)F %% | {f2} | min 2 edges | | ||
- | | %%(* A (--> | ||
- | |**Combined** ||| | ||
- | | %%f:F, A +> f, A < f %% | {f1} | patterns combined by comma | |
tutorials/common_graph_queries.1728637832.txt.gz · Last modified: 2024/10/11 11:10 by tim