comparators

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCounterexampleFound = errors.New("no counterexample found")
	ErrAlphabetsDiffer       = errors.New("alphabets differ")
)

Functions

This section is empty.

Types

type HopcroftKarp

type HopcroftKarp[T any] struct{}

func (HopcroftKarp[T]) AreEquivalent

func (h HopcroftKarp[T]) AreEquivalent(automaton1 automata.Automaton[T], automaton2 automata.Automaton[T]) (bool, error)

func (HopcroftKarp[T]) GetCounterexampleBetween

func (h HopcroftKarp[T]) GetCounterexampleBetween(automaton1 automata.Automaton[T], automaton2 automata.Automaton[T]) (interfaces.Sequence[T], error)

type RandomWalk

type RandomWalk[T any] struct {
	// MaxSteps is the maximum number of steps to take in the random walk.
	// If MaxSteps is 0, then the random walk will continue until a counterexample is found.
	MaxSteps int
	// ResetProbability is the probability of resetting the random walk to the initial state.
	// If ResetProbability is 0, then the random walk will never reset.
	ResetProbability float64
	// Rand is the random number generator to use. If Rand is nil, then the default random number
	// generator will be used, keep in mind that the default random number generator is deterministic.
	Random *rand.Rand
}

func NewRandomWalk

func NewRandomWalk[T any](maxSteps int, resetProbability float64, random *rand.Rand) *RandomWalk[T]

func (*RandomWalk[T]) AreEquivalent

func (r *RandomWalk[T]) AreEquivalent(automaton1 automata.Automaton[T], automaton2 automata.Automaton[T]) (bool, error)

func (*RandomWalk[T]) GetCounterexampleBetween

func (r *RandomWalk[T]) GetCounterexampleBetween(a1 automata.Automaton[T], a2 automata.Automaton[T]) (interfaces.Sequence[T], error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL