Exemplo n.º 1
0
		private SuffixNode(SuffixTree tree, int from, int to)
		{
			Tree = tree;
			From = from;
			To = to;
			NodeId = Interlocked.Increment(ref Tree.lastNodeId);
		}
Exemplo n.º 2
0
		public static SuffixTree Create(string s)
		{
			var tree = new SuffixTree();
			if (!s.EndsWith(tree.Separator + ""))
			{
				s += tree.Separator;
			}
			tree.String = s;
			var builder = new SuffixTreeBuilder(tree);
			builder.BuildTree();
			return tree;
		}
Exemplo n.º 3
0
		public SuffixTreeBuilder(SuffixTree tree)
		{
			Tree = tree;
			CurrentNode = tree.Root;
		}
Exemplo n.º 4
0
		/// <summary>
		/// Ctor for root
		/// </summary>
		internal SuffixNode(SuffixTree tree) :
			this(tree, -1, 0)
		{
		}