// STORE
_________________________________________
I am mapping symbols to roots. Let me attempt to give a very crude high
level, simple description of storing data a go here. Okay, pick any
complex number Z[0], except for (0, 0). Now, think of some symbols to
store, say 012. That's three symbols, so we are storing 3-ary data. Lets
say that S[0...2] maps to each one where S[0] = 0, S[1] = 1 and S[2] =
2. Fine.
Lets take the 3 roots of Z[0], as R_0[0...2] such that raising any R_0
to the power of 3 gains Z[0]. Now, we map S[0] to R_0[0]. Lets set Z[1]
equal to R_0[0]. We just stored the first symbol in S via Z[1]. Nice.
Now, we take the 3 roots of Z[1] as R_1[0...2] such that raising any R_1
to the power of 3 gains Z[1]. We map S[1] to R_1[1] as Z[2]. We just
stored the second symbol in S as Z[2], fine.
Finally, we take the 3 roots of Z[2] as R_2[0...2] such that raising any
R_2 to the power of 3 gains Z[2]. We map S[2] to R_2[2] as Z[3]. We just
stored the third and final symbol in S as Z[3], fine.
The final stored point is Z[3] for it contains the 3 symbols in S.
That is how I am storing data in complex numbers.
// LOAD
_________________________________________
Here is how I am loading the symbols back from Z[3], or T in your example.
We raise Z[3] to the power of 3 to get Z[2]. Now we take the 3 roots of
Z[2] as R_2[0...2]. We search for Z[3] in R_2[0...2] and find that Z[3]
is equal to R_2[2], the index is 2. So, we know that S[2] is the last
symbol. Lets map that to a new string L[0...2] where L[0] = S[2]. We
compare Z[2] to Z[0], notice that its not equal and continue. Fine.
Now, we raise Z[2] to the power of 3 to get Z[1]. We take the three
roots of Z[1] as R_1[0...2], perform a search in R_1 for Z[2]. We find
that that Z[2] is equal to R_1[1], the index is 1. Therefore, we map
L[1] to S[1]. We compare Z[1] to Z[0], find that is not equal and continue.
Okay. We raise Z[1] to the power of 3 to get Z[0], the "original" Z so
to speak. Take the 3 roots of Z[0] as R_0[0...2] and search it for Z[1].
We find that R_0[0] is equal to Z[1], index 0, and map L[2] to S[0].
Then we compare Z[0] to Z[0], fine that it is indeed equal, and quit.
Now, we have L[0...2] as "210". We reverse L to gain "012", and we have
the original stored data.
This is a very crude explanation, and the code can be much better, but
this is how I am doing it for now. I have some ideas on how to make it
much more efficient.
Any thoughts? Thanks.