WIP: step 1 - enumeration of the MergedPartialTestVectorRepresentations now takes the SharedPathPrefix into account. Also renamed some inconsistently named parameters to make traversal come into alignment with removal.
WIP: step 2 - cut over to using an array instead of a list to represent the SharedPathPrefix (otherwise the memory savings aren't going to be hugely better than using a degenerate ternary search tree - and using lists tends to force us down the path of recursion, which again is what we're trying to optimize here). Also removed some unnecessary cruft from the invariant check - and have added some of the logic to deal with SharedPathPrefix when adding partial test vectors - at least the structural maintenance part. Still not actually populating the SharedPathPrefix yet.
WIP: step 3 - now added in support for actually populating the SharedPathPrefix: also cut over the old degenerate linear tree code into simpler code that again uses SharedPathPrefix - albeit only when adding test vectors. This now breaks the unit tests, as the merge / remove code hasn't caught up with these changes - this is expected.
WIP: step 4 - after having examined the line of code commented as being probably unused and checking its coverage via the debugger in the last commit prior to this cutover WIP cycle, it does appear that it is unused, so this change reflects that.
WIP: step 5 - remembered to modify traversal context parameters for the removal case by analogy to the enumeration case.
WIP: step 6 - first steps for dealing with SharedPathPrefix during removal - have done the basic maintenance of the SharedPathPrefix, but haven't cut over the internals of the ternary search tree code to be consistent with it yet. Not expecting the unit tests to pass yet.
WIP: step 7 - fix bug in the invariant checking code (it was not tracking of the test variable index through the SharedPrefixPath), lots of cosmetic / format changes. it doesn't pass the unit tests at this point, so time to find the bugs...
WIP: step 8 - where one SharedPathPrefix leads to a following subtree that in
turn leads to a single SharedPathPrefix, tidy these up during removal to make a
single SharedPathPrefix. Unit tests still broken...
WIP: step 9 - refactor to use active patterns and construction helpers to make the intent clearer when looking for special cases in the TestVectorPaths substructure. Unit tests are still broken...
WIP: step 10 - refactor to remove AugmentedInternalNode and all the cruft that went with it. Tests are still not passing.
WIP: step 11 - minor fix for bug caused by typo introduced in step 9 along with a simplification of logic for removal of vectors that are prefixes. Still hasn't fixed the unit test breakage.
WIP: step 12 - took out the nasty step-by-step introduction of a splitting ternary search tree node into a SharedPathPrefix when removing - now using a more direct approach that is hopefully more efficient. This now makes all the tests fail in the same way, which is progress of a sort. Tests are still broken...
WIP: step 13 - refactoring, plus a performance enhancement and a supposed bug-fix for when a removal truncates a path in the case where the query partial vector trivially disagrees with the SharedPathPrefix. AFAICT tell, this has messed things up completely - this commit may get erased soon.
WIP: step 14 - definite improvement: simplified treatment of SharedPathPrefix so that only fundamental mismatches between different determinate levels cause branches to be introduced or removals to fail. Also fixed a severe bug introduced in the previous commit that was infinitely extending the query partial test vector during removal if it was initially too short. A good proportion of the unit tests now pass, although there are still breakages. We're on the way back up...
WIP: step 14 - minor renaming for the sake of clarity, plus additional defensive postcondition checking for the merge-via-remove case.
WIP: step 15 - more defensive postcondition checking, this time for the result of adding. It fails too - which is consistent with the pattern of breaking tests. Either the 'add' operation is not preserving the added vector as a unique item, or the 'remove' operation should have merged the vector to start with - the former seems more likely.
WIP: fix annoying extraneous whitespace causing havoc with pre-commit hook.

--HG--
extra : amend_source : 302e1440f81b761b09f4ebd0fdb10c9603cf74a6
WIP step 16 - got all the unit tests passing again! Realised that relaxed
matching should only occur for removal - addition needs to use strict matching,
and also needs to introduce branches into the SharedPathPrefix for wildcard
vs determinate matches in both directions across the SharedPathPrefix against
the new partial test vector representation.
NuGet dependencies update, plus minor formatting changes.
WIP: step 16 - enter ChunkedList and its test - not yet fully implemented.