MCPcopy Create free account

hub / github.com/charlesreid1/five-letter-words / functions

Functions30 in github.com/charlesreid1/five-letter-words

↓ 11 callersFunctionget_words
()
get_words.py:8
↓ 3 callersFunctiontrie_search
(n, verbose=False)
tries.py:232
↓ 2 callersFunctionword2bitvector
Turns a five-letter word into a bit vector representing character coverage. Uses 26 letters by default.
letter_coverage.py:19
↓ 2 callersFunctionword2vec
(word)
euclidean_distance.py:22
↓ 1 callersMethod_assemble
Recursive private method called by assemble().
tries.py:146
↓ 1 callersMethod_bubble_up
Pre-order depth-first traversal starting at the leaf nodes and proceeding upwards.
tries.py:209
↓ 1 callersMethodassemble
Assemble the trie from the set of words passed to the constructor.
tries.py:132
↓ 1 callersFunctionbtsolution
Reconstruct the sequence of words that gives maximum coverage and minimum word count. Input: minimum word key (last word), minimum value (nu
letter_coverage.py:47
↓ 1 callersMethodbubble_up
Do a depth-first traversal of the entire trytrietree, pruning as we go. This is a pre-order traversal, meaning we traverse chi
tries.py:197
↓ 1 callersFunctioneuclidean_distance
(word1, word2)
euclidean_distance.py:13
↓ 1 callersFunctiongen_variations
Recursive backtracking method to assemble strings differing by +/-distance at each position
diff_by_n.py:13
↓ 1 callersFunctionget_all_variations
Return all possible words that differ from `word` by +/-distance in each index. This does not include `word` in the variations.
diff_by_n.py:28
↓ 1 callersMethodget_node_from_prefix
Given a string prefix, return the node that represents the tail end of that sequence of letters in this trie. Return N
tries.py:104
↓ 1 callersMethodget_prefix_from_node
Given a node in the trie, return the string prefix that would lead to that node.
tries.py:87
↓ 1 callersFunctionin_reverse_sorted_order
(word)
reverse_lexico.py:12
↓ 1 callersFunctionin_sorted_order
(word)
lexico.py:12
↓ 1 callersFunctionis_near_palindrome
(word,lo,hi)
near_palindromes.py:11
↓ 1 callersFunctionis_palindrome
(word)
palindromes.py:13
↓ 1 callersFunctionis_palindrome_pair
(word1,word2)
palindromes.py:20
↓ 1 callersFunctionl2norm
(vec1, vec2)
euclidean_distance.py:18
↓ 1 callersFunctionmain
Find pairs of SGB word vectors that differ by +/-distance in each component. To do this, iterate through each word, generate th
diff_by_n.py:42
↓ 1 callersFunctionprint_tuple
(e)
euclidean_distance.py:30
↓ 1 callersMethodset_root
(self,root_letter)
tries.py:83
↓ 1 callersFunctiontrie_table
Compute and print a table of number of words n versus number of perfect tries formed.
tries.py:269
Method__init__
(self, letter, count=0)
tries.py:39
Method__init__
(self,words)
tries.py:47
Method__str__
(self)
tries.py:51
Method_str_recursive
(runner,depth)
tries.py:56
Functionget_dummy_words
()
letter_coverage.py:66
Functionprintbv
Pretty printing for boolean bit vector
letter_coverage.py:34