Class DNN_angular1_neighbors
java.lang.Object
io.nosqlbench.virtdata.lib.vectors.dnn.angular.DNN_angular1_neighbors
- All Implemented Interfaces:
IntFunction<int[]>
Compute the indices of the neighbors of a given v using DNN mapping.
To avoid ambiguity on equidistant neighbors, odd neighborhood sizes are preferred.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DNN_angular1_neighbors
public DNN_angular1_neighbors(int k, int N, int modulus) - Parameters:
k- The size of neighborhoodN- The number of total vectors, necessary for boundary conditions of defined vectormodulus- The modulus used during training of angular1 data; this corresponds to how periodically we cycle back to vectors with the same angle (hence have angular distance zero between them)
-
-
Method Details
-
apply
public int[] apply(int value) - Specified by:
applyin interfaceIntFunction<int[]>- Parameters:
value- the function argument, or the index of the query vector for the DNN addressing scheme- Returns:
- A ranked neighborhood of vector indices, using the DNN addressing scheme
-