diff options
| author | JSDurand <mmemmew@gmail.com> | 2024-01-08 16:13:19 +0800 |
|---|---|---|
| committer | JSDurand <mmemmew@gmail.com> | 2024-01-08 16:13:19 +0800 |
| commit | 3ae0cf9898485a2ec35df7d23cd274e7dea5796d (patch) | |
| tree | 35acbd1223288eb6f62ab281b57845c0ce2ed1c5 /chain/src/atom/default.rs | |
| parent | 55f7068e91182dfe458fad41c3251388ea461569 (diff) | |
a commit before the forst query
I think the main functionalities are already there, but the lack of
querying capabilities makes this not very useful at the moment.
This commit is right before an attempt to add this missing piece.
Diffstat (limited to 'chain/src/atom/default.rs')
| -rw-r--r-- | chain/src/atom/default.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chain/src/atom/default.rs b/chain/src/atom/default.rs index df61b6f..c6289f1 100644 --- a/chain/src/atom/default.rs +++ b/chain/src/atom/default.rs @@ -213,6 +213,11 @@ impl LabelGraph<LabelType<TNT>> for DefaultAtom { where Self: 'b; + type TupleIter<'b> = <DefaultNFA<LabelType<TNT>> as LabelGraph<LabelType<TNT>>>::TupleIter<'b> + where + Self: 'b, + DOption<TNT>: 'b; + type LabelIter<'b> = <DefaultNFA<LabelType<TNT>> as LabelGraph<LabelType<TNT>>>::LabelIter<'b> where Self: 'b, @@ -247,6 +252,11 @@ impl LabelGraph<LabelType<TNT>> for DefaultAtom { } #[inline] + fn tuples_of(&self, node_id: usize) -> Result<Self::TupleIter<'_>, GraphError> { + self.nfa.tuples_of(node_id) + } + + #[inline] fn labels_of(&self, node_id: usize) -> Result<Self::LabelIter<'_>, GraphError> { self.nfa.labels_of(node_id) } |
