Пример #1
0
        bool FindSubstr(string substr, out ConnectorVertex connections)
        {
            var node = index.Head;
             connections = null;
             substr = Regex.Replace(substr, "[^a-z]", "");

             for (var i = 0; i < substr.Length; i++)
             {
            if (node.HasLink(substr[i]) == false)
               return false;

            node = node.GetLink(substr[i]);
             }

             connections = node.connections;
             return true;
        }
        private bool FindSubstring(string substring, out ConnectorVertex connections)
        {
            var node = this.index.Head;
            connections = null;
            substring = Regex.Replace(substring, "[^a-z]", string.Empty);

            for (int i = 0; i < substring.Length; i++)
            {
                if (node.HasLink(substring[i]) == false)
                {
                    return false;
                }

                node = node.GetLink(substring[i]);
            }

            connections = node.Connections;
            return true;
        }
Пример #3
0
        bool FindSubstr(string substr, out ConnectorVertex connections)
        {
            var node = index.Head;

            connections = null;
            substr      = Regex.Replace(substr, "[^a-z]", "");

            for (var i = 0; i < substr.Length; i++)
            {
                if (node.HasLink(substr[i]) == false)
                {
                    return(false);
                }

                node = node.GetLink(substr[i]);
            }

            connections = node.connections;
            return(true);
        }