Class AdjacencyGraph

java.lang.Object
me.gosimple.nbvcxz.resources.AdjacencyGraph

public class AdjacencyGraph extends Object
Author:
Adam Brusselback.
  • Constructor Details

    • AdjacencyGraph

      public AdjacencyGraph(String name, HashMap<Character,String[]> keyMap)
      Parameters:
      name - the name of the graph
      keyMap - the keyMap for the graph
  • Method Details

    • getKeyMap

      public HashMap<Character,String[]> getKeyMap()
      Returns:
      The key map for this adjacency graph
    • getAverageDegree

      public double getAverageDegree()
      Calculates the average "degree" of a keyboard or keypad. On the qwerty keyboard, 'g' has degree 6, being adjacent to 'ftyhbv' and '\' has degree 1.
      Returns:
      the average degree for this keyboard or keypad
    • getName

      public String getName()
      Returns:
      Returns the name