From f14c8a2aeab18a9bfa380df28f94736580e08f48 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 9 Aug 2023 11:42:03 +0800 Subject: 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. --- chain/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chain/src/lib.rs') 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; } -- cgit v1.2.3-18-g5258