summaryrefslogtreecommitdiff
path: root/chain/src/lib.rs
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-08-09 11:42:03 +0800
committerJSDurand <mmemmew@gmail.com>2023-08-09 11:42:03 +0800
commitf14c8a2aeab18a9bfa380df28f94736580e08f48 (patch)
tree352cdff6872c9c48575c7dfcfd02a5924a8d2ad9 /chain/src/lib.rs
parentf4f8b84a3a95bea42c118d14697076c2de52c8bb (diff)
Fix a bug of using incorrect forest nodes to plant.
Previously some incorrect forest nodes will be used for planting new nodes. I cannot fix the root cause of their presence in the chain-rule machine. But I can ignore them when they are encountered. Of course I would like to really prevent them from existing, but still cannot figure out how.
Diffstat (limited to 'chain/src/lib.rs')
-rw-r--r--chain/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/chain/src/lib.rs b/chain/src/lib.rs
index bf3a8b4..f16ebb2 100644
--- a/chain/src/lib.rs
+++ b/chain/src/lib.rs
@@ -61,8 +61,13 @@ impl Edge {
self.forest_source
}
- /// Return the associated bottom edge of the edge from which
- /// onwards we shall perform the reduction.
+ /// Set the associated forest edge of the edge of the edge.
+ pub fn set_forest_source(&mut self, source: PaVi) {
+ self.forest_source = source;
+ }
+
+ /// Set the associated bottom edge of the edge from which onwards
+ /// we shall perform the reduction.
pub fn set_true_source(&mut self, true_source: PaVi) {
self.true_source = true_source;
}