Documentation
¶
Overview ¶
Package anagrammer uses a DAWG instead of a GADDAG to simplify the algorithm and make it potentially faster - we don't need a GADDAG to generate anagrams/subanagrams.
This package generates anagrams and subanagrams and has an RPC interface.
Index ¶
Constants ¶
View Source
const BlankPos = alphabet.MaxAlphabetSize
Variables ¶
View Source
var Dawgs map[string]*dawgInfo
Functions ¶
func Anagram ¶
func Anagram(letters string, d *gaddag.SimpleDawg, mode AnagramMode) []string
Types ¶
type AnagramMode ¶ added in v0.0.5
type AnagramMode int
const ( ModeBuild AnagramMode = iota ModeExact ModePattern )
type AnagramStruct ¶ added in v0.0.6
type AnagramStruct struct {
// contains filtered or unexported fields
}
type RackWrapper ¶ added in v0.2.11
type RackWrapper struct {
// contains filtered or unexported fields
}
RackWrapper wraps an alphabet.Rack and adds helper data structures to make it usable for anagramming.
Click to show internal directories.
Click to hide internal directories.