copmletes diagonal iterator example for infinite breadth, infinte depth tree
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Mon, 13 Jan 2025 05:01:52 +0000 (05:01 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Mon, 13 Jan 2025 05:01:52 +0000 (05:01 +0000)
14 files changed:
developer/example/IndexTree/Graph.class [new file with mode: 0644]
developer/example/IndexTree/Label.class [new file with mode: 0644]
developer/example/IndexTree/Node.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Child$1.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Child$2.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Child$3.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Child.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Diagonal$Topo_InfiniteRight.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Diagonal.class [new file with mode: 0644]
developer/example/IndexTree/SRTM_Diagonal.java
developer/example/IndexTree/SRTM_Diagonal_CLI [new file with mode: 0755]
developer/example/IndexTree/SRTM_Diagonal_CLI.class [new file with mode: 0644]
developer/example/IndexTree/four_down_four_across_CLI [new file with mode: 0755]
developer/example/IndexTree/four_down_four_across_CLI.class [new file with mode: 0644]

diff --git a/developer/example/IndexTree/Graph.class b/developer/example/IndexTree/Graph.class
new file mode 100644 (file)
index 0000000..79b4c84
Binary files /dev/null and b/developer/example/IndexTree/Graph.class differ
diff --git a/developer/example/IndexTree/Label.class b/developer/example/IndexTree/Label.class
new file mode 100644 (file)
index 0000000..e7d174a
Binary files /dev/null and b/developer/example/IndexTree/Label.class differ
diff --git a/developer/example/IndexTree/Node.class b/developer/example/IndexTree/Node.class
new file mode 100644 (file)
index 0000000..cd5ec53
Binary files /dev/null and b/developer/example/IndexTree/Node.class differ
diff --git a/developer/example/IndexTree/SRTM_Child$1.class b/developer/example/IndexTree/SRTM_Child$1.class
new file mode 100644 (file)
index 0000000..1d53b63
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Child$1.class differ
diff --git a/developer/example/IndexTree/SRTM_Child$2.class b/developer/example/IndexTree/SRTM_Child$2.class
new file mode 100644 (file)
index 0000000..3a4e1fe
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Child$2.class differ
diff --git a/developer/example/IndexTree/SRTM_Child$3.class b/developer/example/IndexTree/SRTM_Child$3.class
new file mode 100644 (file)
index 0000000..28b681c
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Child$3.class differ
diff --git a/developer/example/IndexTree/SRTM_Child.class b/developer/example/IndexTree/SRTM_Child.class
new file mode 100644 (file)
index 0000000..b43542c
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Child.class differ
diff --git a/developer/example/IndexTree/SRTM_Diagonal$Topo_InfiniteRight.class b/developer/example/IndexTree/SRTM_Diagonal$Topo_InfiniteRight.class
new file mode 100644 (file)
index 0000000..0fa11fa
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Diagonal$Topo_InfiniteRight.class differ
diff --git a/developer/example/IndexTree/SRTM_Diagonal.class b/developer/example/IndexTree/SRTM_Diagonal.class
new file mode 100644 (file)
index 0000000..be3e978
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Diagonal.class differ
index a17592e..f2ef3f4 100644 (file)
@@ -161,27 +161,23 @@ public class SRTM_Diagonal extends Ariadne_SRTM{
 
     @Override public void step(){
 
-      // Create a new diagonal and child_srtm_list_1
       List<Label> diagonal_1 = new ArrayList<>();
 
-      // Step 2: add child list for each node on the current diagonal
+      // inc_down from each node on diagonal_0 -> entry on child_strm list
       Ariadne_SRTM_List<Label> diagonal_srtm = Ariadne_SRTM_List.make(diagonal);
       if( diagonal_srtm.can_read() ){
         do{
-          // 2.1 Read label_0 from diagonal_0
-          Label label = diagonal_srtm.read().copy();
-          label.inc_down();
-          child_srtm_list.add(SRTM_Child.make(label));
+          Node node = Node.make(diagonal_srtm.read());
+          child_srtm_list.add(node.neighbor()); // graph node neighbor == tree node child
           if( !diagonal_srtm.can_step() ) break;
           diagonal_srtm.step();
         }while(true);
       }
 
-      // Add the current node from each child list to the new diagonal
+      // add to diagonal_1 from each on entry on the child_strm list
       Ariadne_SRTM_List<SRTM_Child> child_srtm_srtm = Ariadne_SRTM_List.make(child_srtm_list);
       if( child_srtm_srtm.can_read() ){
         do{
-          // 3.1 Read child_srtm and get its current label
           SRTM_Child child_srtm = child_srtm_srtm.read();
           Label label = child_srtm.read();
           diagonal_1.add(label.copy());
diff --git a/developer/example/IndexTree/SRTM_Diagonal_CLI b/developer/example/IndexTree/SRTM_Diagonal_CLI
new file mode 100755 (executable)
index 0000000..f93b5c4
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+java SRTM_Diagonal_CLI
diff --git a/developer/example/IndexTree/SRTM_Diagonal_CLI.class b/developer/example/IndexTree/SRTM_Diagonal_CLI.class
new file mode 100644 (file)
index 0000000..e91415a
Binary files /dev/null and b/developer/example/IndexTree/SRTM_Diagonal_CLI.class differ
diff --git a/developer/example/IndexTree/four_down_four_across_CLI b/developer/example/IndexTree/four_down_four_across_CLI
new file mode 100755 (executable)
index 0000000..89be062
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+java four_down_four_across_CLI
diff --git a/developer/example/IndexTree/four_down_four_across_CLI.class b/developer/example/IndexTree/four_down_four_across_CLI.class
new file mode 100644 (file)
index 0000000..c06cb5a
Binary files /dev/null and b/developer/example/IndexTree/four_down_four_across_CLI.class differ