// G component
double d = 0;
k11 = new Matrix(getK11(ghkPot.getKValue(i).getkMatrix(),ghkPot));
h1 = new Matrix(getH1(ghkPot.getHValue(i).gethMatrix(), ghkPot));
double logValue = k11.det() > 0 ? Math.log(k11.det()):k11.det();
System.out.println("Calculated values are "+ghkPot.getGValue(i)+" and "+ (0.5* (y1.size() * Math.log(2 * Math.PI)- logValue + (h1.transpose().times(matInverse(k11)).times(h1)).det())));
d = ghkPot.getGValue(i)
+ 0.5
* (y1.size() * Math.log(2 * Math.PI)
- logValue + (h1.transpose().times(matInverse(k11)).times(h1)).det());