int_tree

package
v0.0.0-...-7d8a650 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Alphabet = [26]rune{
	ToRune("a"),
	ToRune("b"),
	ToRune("c"),
	ToRune("d"),
	ToRune("e"),
	ToRune("f"),
	ToRune("g"),
	ToRune("h"),
	ToRune("i"),
	ToRune("j"),
	ToRune("k"),
	ToRune("l"),
	ToRune("m"),
	ToRune("n"),
	ToRune("o"),
	ToRune("p"),
	ToRune("q"),
	ToRune("r"),
	ToRune("s"),
	ToRune("t"),
	ToRune("u"),
	ToRune("v"),
	ToRune("w"),
	ToRune("x"),
	ToRune("y"),
	ToRune("z"),
}

Functions

func CreateIntDictionaryTree

func CreateIntDictionaryTree(filename string) (Node, []WordDetails)

* Creates a trie of WordDetails where int is used instead of runes The int is the index of a letter in Alphabet

func ToAlphabetIndex

func ToAlphabetIndex(letter rune) int

func ToRune

func ToRune(letter string) rune

Types

type LetterCount

type LetterCount struct {
	Letter int
	Count  byte
}

type Node

type Node struct {
	Children map[int]*Node
	Words    []*WordDetails
}

type WordDetails

type WordDetails struct {
	Word               string
	SortedLetterCounts []LetterCount
}

func NewWordDetails

func NewWordDetails(word string) WordDetails

type WordDetailsSlice

type WordDetailsSlice []WordDetails

Jump to

Keyboard shortcuts

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