Skip to content

Commit 9a91f15

Browse files
committed
Duplicate atoms in AtomIndex to reproduce old GroundingSpace behavior
1 parent e8b9d9e commit 9a91f15

File tree

2 files changed

+241
-31
lines changed

2 files changed

+241
-31
lines changed

lib/src/atom/matcher.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,15 @@ impl BindingsSet {
970970
BindingsSet(smallvec::smallvec![])
971971
}
972972

973-
/// Creates a new unconstrained BindingsSet
973+
/// Creates a new BindingsSet with a single full match
974974
pub fn single() -> Self {
975975
BindingsSet(smallvec::smallvec![Bindings::new()])
976976
}
977+
978+
/// Creates a new BindingsSet with `count` full matches
979+
pub fn count(count: usize) -> Self {
980+
BindingsSet(smallvec::SmallVec::from_elem(Bindings::new(), count))
981+
}
977982

978983
/// Returns `true` if a BindingsSet contains no Bindings Objects (fully constrained)
979984
///

0 commit comments

Comments
 (0)