C# Класс LevenshteinAutomaton.LevTAutomataImitation

Universal deterministic Levenshtein automaton for Damerau-Levenshtein distance
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
N int
StateCount int
VectorCount int
VectorLength int
W int
Word string

Открытые методы

Метод Описание
AcceptWord ( string word ) : bool

Check if this automaton accepts given word (i.e. edit distance between Word and word <= N)

GetCharacteristicVector ( char letter, int position ) : int

Gets the characteristic vector for given letter and position.

GetNextState ( int vector ) : AutomatonState

Evaluate next automaton state (without actual transition)

IsAcceptState ( int state, int offset ) : bool

Check if given state is the accept state for given offset

LevTAutomataImitation ( string word, int n ) : System

Initializes a new instance of the LevTAutomataImitation class.

LoadState ( int state, int offset ) : void

Loads automaton state and offset.

NextState ( char letter ) : void

Make transition to the next state for the given letter

NextState ( int vector ) : void

Make transition to the next state for the given characteristic vector

Защищенные методы

Метод Описание
UpdateMatricies ( ) : void

Select current state transition matrix and offset increment matrix

Описание методов

AcceptWord() публичный Метод

Check if this automaton accepts given word (i.e. edit distance between Word and word <= N)
public AcceptWord ( string word ) : bool
word string Word to check
Результат bool

GetCharacteristicVector() публичный Метод

Gets the characteristic vector for given letter and position.
public GetCharacteristicVector ( char letter, int position ) : int
letter char Letter.
position int Position.
Результат int

GetNextState() публичный Метод

Evaluate next automaton state (without actual transition)
public GetNextState ( int vector ) : AutomatonState
vector int Characteristic vector.
Результат AutomatonState

IsAcceptState() публичный Метод

Check if given state is the accept state for given offset
public IsAcceptState ( int state, int offset ) : bool
state int State.
offset int Offset.
Результат bool

LevTAutomataImitation() публичный Метод

Initializes a new instance of the LevTAutomataImitation class.
public LevTAutomataImitation ( string word, int n ) : System
word string Word
n int Maximum edit distance
Результат System

LoadState() публичный Метод

Loads automaton state and offset.
public LoadState ( int state, int offset ) : void
state int State.
offset int Offset.
Результат void

NextState() публичный Метод

Make transition to the next state for the given letter
public NextState ( char letter ) : void
letter char Letter.
Результат void

NextState() публичный Метод

Make transition to the next state for the given characteristic vector
public NextState ( int vector ) : void
vector int Vector.
Результат void

UpdateMatricies() защищенный Метод

Select current state transition matrix and offset increment matrix
protected UpdateMatricies ( ) : void
Результат void

Описание свойств

N публичное свойство

Allowed modifications count
public int N
Результат int

StateCount публичное свойство

The state count.
public int StateCount
Результат int

VectorCount публичное свойство

Possible characteristic vector value count
public int VectorCount
Результат int

VectorLength публичное свойство

Characteristic vector length
public int VectorLength
Результат int

W публичное свойство

Word length
public int W
Результат int

Word публичное свойство

The word.
public string Word
Результат string