michaeldickens / Typing

https://github.com/michaeldickens/Typing
69 stars 18 forks source link

Question about compileTypingData() ... #10

Closed FrankDMartinez closed 12 years ago

FrankDMartinez commented 12 years ago

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?

michaeldickens commented 12 years ago

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: https://github.com/MTGandP/Typing/issues/10

FrankDMartinez commented 12 years ago

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()?

michaeldickens commented 12 years ago

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: https://github.com/MTGandP/Typing/issues/10#issuecomment-7407519

FrankDMartinez commented 12 years ago

Thanks! :-D