Versions in this module Expand all Collapse all v0 v0.0.2 Feb 4, 2022 v0.0.1 Feb 4, 2022 Changes in this version + const BackHooks + const BackInnerHook + const FrontHooks + const FrontInnerHook + func CacheLoadFunc(cfg *config.Config, key string) (interface{}, error) + func FindHooks(d *SimpleDawg, word string, hookType int) []rune + func FindInnerHook(d *SimpleDawg, word string, hookType int) bool + func FindMachineWord(d GenericDawg, word alphabet.MachineWord) bool + func FindPrefix(d *SimpleDawg, prefix string) bool + func FindWord(d *SimpleDawg, word string) bool + func Set(name string, data []byte, t GenericDawgType) error + type DawgAnagrammer struct + func (da *DawgAnagrammer) Anagram(dawg GenericDawg, f func(alphabet.MachineWord) error) error + func (da *DawgAnagrammer) InitForMachineWord(dawg GenericDawg, machineTiles alphabet.MachineWord) error + func (da *DawgAnagrammer) InitForString(dawg GenericDawg, tiles string) error + func (da *DawgAnagrammer) IsValidJumble(dawg GenericDawg, word alphabet.MachineWord) (bool, error) + func (da *DawgAnagrammer) Subanagram(dawg GenericDawg, f func(alphabet.MachineWord) error) error + func (da *DawgAnagrammer) Superanagram(dawg GenericDawg, f func(alphabet.MachineWord) error) error + type GenericDawg interface + ArcToIdxLetter func(arcIdx uint32) (uint32, alphabet.MachineLetter) + GetAlphabet func() *alphabet.Alphabet + GetLetterSet func(nodeIdx uint32) alphabet.LetterSet + GetRootNodeIndex func() uint32 + InLetterSet func(letter alphabet.MachineLetter, nodeIdx uint32) bool + LexiconName func() string + NextNodeIdx func(uint32, alphabet.MachineLetter) uint32 + Nodes func() []uint32 + NumArcs func(nodeIdx uint32) byte + Type func() GenericDawgType + type GenericDawgType string + const TypeDawg + const TypeGaddag + type Lexicon struct + func (l Lexicon) HasAnagram(word alphabet.MachineWord) bool + func (l Lexicon) HasWord(word alphabet.MachineWord) bool + func (l Lexicon) Name() string + type SimpleDawg struct + func GetDawg(cfg *config.Config, name string) (*SimpleDawg, error) + func LoadDawg(filename string) (*SimpleDawg, error) + func ReadDawg(data io.Reader) (*SimpleDawg, error) + func (s *SimpleDawg) Reverse() bool + func (s *SimpleDawg) Type() GenericDawgType + type SimpleGaddag struct + func GaddagToSimpleGaddag(g *gaddagmaker.Gaddag) *SimpleGaddag + func Get(cfg *config.Config, name string) (*SimpleGaddag, error) + func LoadGaddag(filename string) (*SimpleGaddag, error) + func ScanGaddag(data io.Reader) (*SimpleGaddag, error) + func (g *SimpleGaddag) ArcToIdxLetter(arcIdx uint32) (uint32, alphabet.MachineLetter) + func (g *SimpleGaddag) GetAlphabet() *alphabet.Alphabet + func (g *SimpleGaddag) GetLetterSet(nodeIdx uint32) alphabet.LetterSet + func (g *SimpleGaddag) GetRootNodeIndex() uint32 + func (g *SimpleGaddag) InLetterSet(letter alphabet.MachineLetter, nodeIdx uint32) bool + func (g *SimpleGaddag) LetterSetAsRunes(nodeIdx uint32) []rune + func (g *SimpleGaddag) LexiconName() string + func (g *SimpleGaddag) NextNodeIdx(nodeIdx uint32, letter alphabet.MachineLetter) uint32 + func (g *SimpleGaddag) Nodes() []uint32 + func (g *SimpleGaddag) NumArcs(nodeIdx uint32) byte + func (g *SimpleGaddag) Type() GenericDawgType