tutorials:custom_storing_node
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorials:custom_storing_node [2025/07/16 14:26] – [Using custom edges] gaetan | tutorials:custom_storing_node [2025/11/25 11:58] (current) – gaetan | ||
|---|---|---|---|
| Line 212: | Line 212: | ||
| You can see that the Node A is still part of the main graph. It is XL query-able and reachable from B by following the edge EDGE_O. However, as the Node A is not connected to the Root by neither BRANCH, nor SUCCESSOR edge, it will not be displayed (not part of the 3d view, and raytracer). | You can see that the Node A is still part of the main graph. It is XL query-able and reachable from B by following the edge EDGE_O. However, as the Node A is not connected to the Root by neither BRANCH, nor SUCCESSOR edge, it will not be displayed (not part of the 3d view, and raytracer). | ||
| + | |||
| + | **Note:** In the example we used EDGE_O, there are actually 13 usable unique bit-wise edge type defined in Library: EDGE_0 to EDGE_12. But it is also possible to use any Integer as " | ||
| + | |||
| + | ==== Example code ==== | ||
| + | |||
| + | <code java> | ||
| + | module A; | ||
| + | static int e = Library.EDGE_0; | ||
| + | module B { | ||
| + | public A* getA(){ | ||
| + | yield (* @128; this -e-> A*); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | protected void init () | ||
| + | [ | ||
| + | Axiom ==> A F ; | ||
| + | ] | ||
| + | |||
| + | public void grow()[ | ||
| + | a:A ==> | ||
| + | ] | ||
| + | |||
| + | public void printParent()[ | ||
| + | b:B ::> println(b.getA()); | ||
| + | ] | ||
| + | </ | ||
tutorials/custom_storing_node.1752668776.txt.gz · Last modified: 2025/07/16 14:26 by gaetan
