adjacency

package
Version: v0.0.0-...-fa2cb28 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 3 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GraphMap = make(map[string]Graph)

GraphMap is a map of all graphs

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Graph map[string][]string

	Name string
	// contains filtered or unexported fields
}

Graph holds information about different graphs

func BuildDvorak

func BuildDvorak() Graph

BuildDvorak builds the Dvorak Graph

func BuildKeypad

func BuildKeypad() Graph

BuildKeypad builds the Keypad Graph

func BuildLeet

func BuildLeet() Graph

BuildLeet builds the L33T Graph

func BuildMacKeypad

func BuildMacKeypad() Graph

BuildMacKeypad builds the Mac Keypad Graph

func BuildQwerty

func BuildQwerty() Graph

BuildQwerty builds the Qwerty Graph

func (Graph) CalculateAvgDegree

func (adjGrp Graph) CalculateAvgDegree() float64

CalculateAvgDegree calclates the average degree between nodes in the graph on qwerty, 'g' has degree 6, being adjacent to 'ftyhbv'. '\' has degree 1. this calculates the average over all keys. TODO double check that i ported this correctly scoring.coffee ln 5

Source Files

Jump to

Keyboard shortcuts

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