michaeldickens/Typing

Question about compileTypingData() ...

Closed this issue · 4 comments

Hi,
Am I correct in presuming the purpose of the keys and values variables in compileTypingData() is to create a hash table of character or digraph frequencies?

Sort of. keys and values are arrays containing corresponding values, but
it's not actually a hash table because the program has no need for
random access. The program iterates over keys and values in scoreDigraph().

On 7/31/12 11:12 AM, FrankDMartinez wrote:

Hi,
Am I correct in presuming the purpose of the keys and values variables in compileTypingData() is to create a hash table of character or digraph frequencies?


Reply to this email directly or view it on GitHub:
#10

Thanks! That helps clear things up a good deal. Does the same apply to keys and values in other functions, such as sortTypingData(), sortDigraphs(), and sortMonographs()?

Yes. diKeys, diValues, monKeys, and monValues are initialized by
initTypingData() and then used in other functions.

On 7/31/12 1:37 PM, FrankDMartinez wrote:

Thanks! That helps clear things up a good deal. Does the same apply to keys and values in other functions, such as sortTypingData(), sortDigraphs(), and sortMonographs()?


Reply to this email directly or view it on GitHub:
#10 (comment)

Thanks! :-D