anagrammer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

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

Variables

View Source
var Dawgs map[string]*dawgInfo

Functions

func Anagram

func Anagram(letters string, d *gaddag.SimpleDawg, mode AnagramMode) []string

func LoadDawgs

func LoadDawgs(cfg *config.Config, dawgPath string)

Types

type AnagramMode

type AnagramMode int
const (
	ModeBuild AnagramMode = iota
	ModeExact
	ModePattern
)

type AnagramStruct

type AnagramStruct struct {
	// contains filtered or unexported fields
}

type RackWrapper

type RackWrapper struct {
	// contains filtered or unexported fields
}

RackWrapper wraps an alphabet.Rack and adds helper data structures to make it usable for anagramming.

Jump to

Keyboard shortcuts

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