diff --git a/src/rax.h b/src/rax.h index 6b1fd4188..e768baa39 100644 --- a/src/rax.h +++ b/src/rax.h @@ -46,13 +46,13 @@ * \ * (o) "fo" * \ - * [t b] "foo" + * [b t] "foo" * / \ - * "foot" (e) (a) "foob" + * "foob" (a) (e) "foot" * / \ - * "foote" (r) (r) "fooba" + * "fooba" (r) (r) "foote" * / \ - * "footer" [] [] "foobar" + * "foobar" [] [] "footer" * * However, this implementation implements a very common optimization where * successive nodes having a single child are "compressed" into the node @@ -61,13 +61,13 @@ * provided inside the representation. So the above representation is turned * into: * - * ["foo"] "" + * ("foo") "" * | - * [t b] "foo" + * [b t] "foo" * / \ - * "foot" ("er") ("ar") "foob" + * "foob" ("ar") ("er") "foot" * / \ - * "footer" [] [] "foobar" + * "foobar" [] [] "footer" * * However this optimization makes the implementation a bit more complex. * For instance if a key "first" is added in the above radix tree, a @@ -82,11 +82,11 @@ * / \ * "firs" ("rst") (o) "fo" * / \ - * "first" [] [t b] "foo" + * "first" [] [b t] "foo" * / \ - * "foot" ("er") ("ar") "foob" + * "foob" ("ar") ("er") "foot" * / \ - * "footer" [] [] "foobar" + * "foobar" [] [] "footer" * * Similarly after deletion, if a new chain of nodes having a single child * is created (the chain must also not include nodes that represent keys),