public static void AnnkPriSearch(double[] point, int nearNeighbourCount, out int[] indexes, out double[] distances, double eps = 0.0) { indexes = new int[nearNeighbourCount]; distances = new double[nearNeighbourCount]; fixed (double* p = point) fixed (int* ind = indexes) fixed (double* d = distances) AnnkPriSearch(p, nearNeighbourCount, ind, d, eps); }