describe a vector with a single unique number

176 Views Asked by At

Is there a way to uniquely describe a vector with a single ( = easy to store) value? e.g. have a function $H(\vec{v}): \mathbb{R}^{130} \rightarrow \mathbb{R} $

I have a lot of vectors in $\mathbb{R}^{130}$ like $$ \vec{v} = [0, 0, 0.02408936187094653, 0, 0, 0, -0.0009220896553828633, 0, 0.013715033276784966, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.086923156150 166640478, 0, 0, 0, 0, 0, 0, -0.004169024626740706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06103892811472592, -0.001827088692541601, 0, 0, 0, 0, 0, 0, 0, 0.021119819421521576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.028956996972808808, 0.01855961039762378, 0, 0, 0, 0, 0.0030550036310233665, 0, 0, 0, 0, 0.04934179336434643, 0, 0, 0, 0] $$ where most dimensions are $0$.

Is there a good solution to map the vector to a single number (in $\mathbb{R}$ or $\mathbb{N}$) where every vector is described in a unique way (and same vectors has same results)? I considered using (cryptographic) hash functions like md5, fnv1a, ... but is this a proper solution for vectors in $\mathbb{R}$?

It is not needed to create a isomorphism between $\vec{v}$ and $H(\vec{v})$, this could be done via lookup table. But $x_1 = x_2 \to H(x_1) = H(x_2) \wedge x_1 \neq x_2 \to H(x_1) \neq H(x_2)$