summaryrefslogtreecommitdiff
path: root/forest
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-01-05 10:24:39 +0800
committerJSDurand <mmemmew@gmail.com>2023-01-05 10:24:39 +0800
commit7dd4935230e303aef8d295d992239d59d95b32d7 (patch)
tree486104820b5f3701518c1030a0393a5cef428cb9 /forest
parentbdbd4b4dc21af09711c97d3f903877443199af06 (diff)
singly labelled graphs
Now I have a new type of labelled graphs, which can index vertices by labels, but not index edges by labels. The biggest difference is that I do not have to keep a hashmap of edge targets by labels, and I do not have to guard against the duplication of nodes with the same set of edges. I guard against nodes with the same label, though. Also, in this graph, both vertices and edges have one label at a time, whereas in the previous labelled graph there can be a multitude of edges between the same source and target nodes, but with different labels. Now it remains to test this type of graphs, and to think through how we attach forest fragments to nondeterministic finite automata edges, and how to join forest fragments together while skipping nullable edges, in order to finish the "compilation" part.
Diffstat (limited to 'forest')
-rw-r--r--forest/src/default.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/forest/src/default.rs b/forest/src/default.rs
index 36145f4..456413b 100644
--- a/forest/src/default.rs
+++ b/forest/src/default.rs
@@ -122,8 +122,8 @@ impl<NodeLabel: GraphLabel, EdgeLabel: GraphLabel> Forest<NodeLabel, EdgeLabel>
}
fn plug(&mut self, other: &Self) -> Result<(), Error> {
- // PLAN: Clone the `other` forest to `self`, adjust the
- // indices for edges, and then add edges between plugs.
+ // PLAN: Produce a BuilderMut, adjust the indices for edges,
+ // and then add edges between plugs.
//
// Since I cannot touch the underlying nodes directly, I have
// to add the nodes and edges individually.