| 1913 | |
| 1914 | |
| 1915 | float quant_single_point_d |
| 1916 | ( |
| 1917 | float data[MAX_ENTRIES][MAX_DIMENSION_BIG], |
| 1918 | int numEntries, int index[MAX_ENTRIES], |
| 1919 | float out[MAX_ENTRIES][MAX_DIMENSION_BIG], |
| 1920 | int epo_1[2][MAX_DIMENSION_BIG], |
| 1921 | int Mi_, // last cluster |
| 1922 | int bits[3], // including parity |
| 1923 | int type, |
| 1924 | int dimension // This should be either 3 or 4 |
| 1925 | ) { |
| 1926 | if (dimension < 3) return FLT_MAX; |
| 1927 | |
| 1928 | int i, j; |
| 1929 | |
| 1930 | float err_0 = FLT_MAX; |
| 1931 | float err_1 = FLT_MAX; |
| 1932 | |
| 1933 | int idx = 0; |
| 1934 | int idx_1 = 0; |
| 1935 | |
| 1936 | int epo_0[2][MAX_DIMENSION_BIG]; |
| 1937 | |
| 1938 | int use_par = (type != 0); |
| 1939 | |
| 1940 | int clog = 0; |
| 1941 | i = Mi_ + 1; |
| 1942 | while (i >>= 1) |
| 1943 | clog++; |
| 1944 | |
| 1945 | // assert((1<<clog)== Mi_+1); |
| 1946 | |
| 1947 | int pn; |
| 1948 | for (pn = 0; pn<npv_nd[dimension - 3][type]; pn++) { |
| 1949 | //1 |
| 1950 | |
| 1951 | int dim1 = dimension - 3; |
| 1952 | int dim2 = type; |
| 1953 | int dim3 = pn; |
| 1954 | |
| 1955 | |
| 1956 | int o1[2][MAX_DIMENSION_BIG]; // = { 0,2 }; |
| 1957 | int o2[2][MAX_DIMENSION_BIG]; // = { 0,2 }; |
| 1958 | |
| 1959 | for (j = 0; j<dimension; j++) { |
| 1960 | //A |
| 1961 | o2[0][j] = o1[0][j] = 0; |
| 1962 | o2[1][j] = o1[1][j] = 2; |
| 1963 | |
| 1964 | if (use_par) { |
| 1965 | if (get_par_vector(dim1, dim2, dim3, 0, j)) |
| 1966 | o1[0][j] = 1; |
| 1967 | else |
| 1968 | o1[1][j] = 1; |
| 1969 | if (get_par_vector(dim1, dim2, dim3, 1, j)) |
| 1970 | o2[0][j] = 1; |
| 1971 | else |
| 1972 | o2[1][j] = 1; |
no test coverage detected