Following are the steps mentioned in the exercise. Doubts are in bold.
- First multiply your vector
v
, with a corresponding plane. This will give you a vector of dimension (1,N_planes)(1,N_planes).looks like multiplied on all planes ?
- You will then convert every element in that vector to 0 or 1.
- You create a hash vector by doing the following: if the element is negative, it becomes a 0, otherwise you change it to a 1.
- You then compute the unique number for the vector by iterating over
N_PLANES
Why iterating again? This is already done in the first step right ?
- Then you multiply 2𝑖2i times the corresponding bit (0 or 1).
- You will then store that sum in the variable
hash_value
.