func (a *Automaton) addTransition(source, dest, label int) {
	a.addTransitionRange(source, dest, label, label)
}
/* Add a new transition with min = max = label.
package automaton
import (
	"fmt"
	"github.com/balzaczyy/golucene/core/util"
	"sort"
	"unicode"
)
type Automaton struct {
	curState      int
	states        []int  
	transitions   []int  
	isAccept      *util.OpenBitSet
	deterministic bool
}
func newEmptyAutomaton() *Automaton {
	return &Automaton{
		deterministic: true,
		curState:      -1,
		isAccept:      util.NewOpenBitSet(),
	}
}
func (a *Automaton) String() string {
	return fmt.Sprintf("{curState=%v,states=%v,transitions=%v,isAccept=%v,%v}",
		a.curState, a.states, a.transitions, a.isAccept, a.deterministic)
}
func (a *Automaton) createState() int {
	state := len(a.states) / 2
	a.states = append(a.states, -1, 0)
	return state
}
func (a *Automaton) setAccept(state int, accept bool) {
	assert2(state < a.numStates(), "state=%v is out of bounds (numStates=%v)", state, a.numStates())
	if accept {
		a.isAccept.Set(int64(state))
	} else {
		a.isAccept.Clear(int64(state))
	}
}
func (a *Automaton) sortedTransitions() [][]*Transition {
	numStates := a.numStates()
	transitions := make([][]*Transition, numStates)
	for s := 0; s < numStates; s++ {
		numTransitions := a.numTransitions(s)
		transitions[s] = make([]*Transition, numTransitions)
		for t := 0; t < numTransitions; t++ {
			transition := newTransition()
			a.transition(s, t, transition)
			transitions[s][t] = transition
		}
	}
	return transitions
}
func (a *Automaton) IsAccept(state int) bool {
	return a.isAccept.Get(int64(state))
}