double[][] matrix = new double[l.size()][l.size()];
// if(gammas[x] == 0)
// return matrix;
//computing matrix
ThreadedMatrixOperator factory = new ThreadedMatrixOperator()
{
@Override
public void doLines(double[][] matrix, int from, int to) {
double tmp = 0;
for(int index = from ; index < to ; index++)
{
double s1 = l.get(index).sample[x];
for(int j = 0 ; j < matrix.length ; j++){
tmp = s1 - l.get(j).sample[x];
// matrix[index][j] = gammas[x]*tmp*tmp;
matrix[index][j] = tmp*tmp;
}
}
}
};
factory.getMatrix(matrix);
return matrix;
}