Add a trieAlter method to TrieKey to replace the implementation of the alter function, and a corresponding gtrieAlter method to the GTrieKey class.
Use gtrieAlter to reimplement gtrieInsert and gtrieDelete for products. This avoids nested lookups followed by nested insertions/deletions, performing the whole modification in one pass.
Add a
trieAlter
method toTrieKey
to replace the implementation of thealter
function, and a correspondinggtrieAlter
method to theGTrieKey
class.Use
gtrieAlter
to reimplementgtrieInsert
andgtrieDelete
for products. This avoids nested lookups followed by nested insertions/deletions, performing the whole modification in one pass.Fixes #23.