コード例 #1
0
    public int LinearSearch()
    {
        var strings  = _strings;
        var segments = _segments;

        var destination = 0;

        for (var i = 0; i < strings.Length; i++)
        {
            destination = _linearSearch.GetDestination(strings[i], segments[i]);
        }

        return(destination);
    }
コード例 #2
0
    public int Dictionary()
    {
        var strings  = _strings;
        var segments = _segments;

        var destination = 0;

        for (var i = 0; i < strings.Length; i++)
        {
            destination = _dictionary.GetDestination(strings[i], segments[i]);
        }

        return(destination);
    }
コード例 #3
0
    public int VectorTrie()
    {
        var strings  = _strings;
        var segments = _segments;

        var destination = 0;

        for (var i = 0; i < strings.Length; i++)
        {
            destination = _vectorTrie.GetDestination(strings[i], segments[i]);
        }

        return(destination);
    }
コード例 #4
0
    public int Implementation()
    {
        var strings  = _strings;
        var segments = _segments;

        var destination = 0;

        for (var i = 0; i < strings.Length; i++)
        {
            destination = _table.GetDestination(strings[i], segments[i]);
        }

        return(destination);
    }