C# 클래스 Lucene.Net.Util.Automaton.AutomatonTestUtil

Utilities for testing automata.

Capable of generating random regular expressions, and automata, and also provides a number of very basic unoptimized implementations (*slow) for testing.

파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
AssertNoDetachedStates ( Automaton a ) : void

Checks that an automaton has no detached states that are unreachable from the initial state.

DeterminizeSimple ( Automaton a ) : void

Simple, original brics implementation of determinize()

DeterminizeSimple ( Automaton a, ISet initialset ) : void

Simple, original brics implementation of determinize() Determinizes the given automaton using the given set of initial states.

IsFiniteSlow ( Automaton a ) : bool

Returns true if the language of this automaton is finite.

WARNING: this method is slow, it will blow up if the automaton is large. this is only used to test the correctness of our faster implementation.

MinimizeSimple ( Automaton a ) : void

Simple, original brics implementation of Brzozowski minimize()

RandomAutomaton ( Random random ) : Automaton

return a random NFA/DFA for testing

RandomRegexp ( Random r ) : string

Returns random string, including full unicode range.

비공개 메소드들

메소드 설명
GetRandomCodePoint ( Random r, Transition t ) : int

picks a random int code point, avoiding surrogates; throws IllegalArgumentException if this transition only accepts surrogates

IsFiniteSlow ( State s, HashSet path ) : bool

Checks whether there is a loop containing s. (this is sufficient since there are never transitions to dead states.)

RandomRegexpString ( Random r ) : string

메소드 상세

AssertNoDetachedStates() 공개 정적인 메소드

Checks that an automaton has no detached states that are unreachable from the initial state.
public static AssertNoDetachedStates ( Automaton a ) : void
a Automaton
리턴 void

DeterminizeSimple() 공개 정적인 메소드

Simple, original brics implementation of determinize()
public static DeterminizeSimple ( Automaton a ) : void
a Automaton
리턴 void

DeterminizeSimple() 공개 정적인 메소드

Simple, original brics implementation of determinize() Determinizes the given automaton using the given set of initial states.
public static DeterminizeSimple ( Automaton a, ISet initialset ) : void
a Automaton
initialset ISet
리턴 void

IsFiniteSlow() 공개 정적인 메소드

Returns true if the language of this automaton is finite.

WARNING: this method is slow, it will blow up if the automaton is large. this is only used to test the correctness of our faster implementation.

public static IsFiniteSlow ( Automaton a ) : bool
a Automaton
리턴 bool

MinimizeSimple() 공개 정적인 메소드

Simple, original brics implementation of Brzozowski minimize()
public static MinimizeSimple ( Automaton a ) : void
a Automaton
리턴 void

RandomAutomaton() 공개 정적인 메소드

return a random NFA/DFA for testing
public static RandomAutomaton ( Random random ) : Automaton
random System.Random
리턴 Automaton

RandomRegexp() 공개 정적인 메소드

Returns random string, including full unicode range.
public static RandomRegexp ( Random r ) : string
r System.Random
리턴 string