get_data() public method

public get_data ( int index, double &data, int length ) : int
index int
data double
length int
return int
Ejemplo n.º 1
0
        public override double[] GetQ(int i, int len)
        {
            double[] data;
            int      start;

            if ((start = _cache.get_data(i, out data, len)) < len)
            {
                for (int j = start; j < len; j++)
                {
                    data[j] = (double)kernel_function(i, j);
                }
            }
            return(data);
        }
Ejemplo n.º 2
0
        public override double[] GetQ(int i, int len)
        {
            double[] data;
            int      j, real_i = index[i];

            if (cache.get_data(real_i, out data, l) < l)
            {
                for (j = 0; j < l; j++)
                {
                    data[j] = (double)kernel_function(real_i, j);
                }
            }

            // reorder and copy
            double[] buf = buffer[next_buffer];
            next_buffer = 1 - next_buffer;
            sbyte si = sign[i];

            for (j = 0; j < len; j++)
            {
                buf[j] = (double)si * sign[j] * data[index[j]];
            }
            return(buf);
        }