Fix it
Small example [use this sandbox and add property PublicDictionary to Walker4]:
/*
public IDictionary<CharSegment, long> PublicDictionary
{
get => Dictionary;
}
*/
var text = "aaaaaaaaaa";
var walker = new Walker4();
walker.WalkAll(text);
foreach (var l in walker.PublicDictionary)
{
foreach (var r in walker.PublicDictionary)
{
Console.WriteLine($"{l} == {r} ==> {l.Key.Equals(r.Key)}");
}
}
CharSegment has bug in Equals method https://github.com/linksplatform/Collections/blob/3643cf14cbf82df06b22df1ec7f9dd0bc5c68f8d/csharp/Platform.Collections/Segments/CharSegment.cs#L31-L46
Fix it Small example [use this sandbox and add property
PublicDictionary
toWalker4
]: