@Override
	public double[][] hessian(double[] X) {
		RealMatrix S = buildS(X);
		CholeskyDecomposition cFact = new CholeskyDecomposition(S);
		RealMatrix SInv = cFact.getSolver().getInverse();
		double[][] ret = new double[dim][dim];
		for (int i = 0; i < dim; i++) {
			for (int j = i; j < dim; j++) {
				double h = SInv.multiply(this.Fi[i])
						.multiply(SInv.multiply(this.Fi[j])).getTrace();
				ret[i][j] = h;
				ret[j][i] = h;
			}
		}
		return ret;
	}
@ Override public double [ ] [ ] hessian ( double [ ] X ) { RealMatrix S = buildS ( X ) ; CholeskyDecomposition cFact = new CholeskyDecomposition ( S ) ; RealMatrix SInv = cFact . getSolver ( ) . getInverse ( ) ; double [ ] [ ] ret = new double [ dim ] [ dim ] ; for ( int i = 0 ; i < dim ; i ++ ) { for ( int j = i ; j < dim ; j ++ ) { double h = SInv . multiply ( this . Fi [ i ] ) . multiply ( SInv . multiply ( this . Fi [ j ] ) ) . getTrace ( ) ; ret [ i ] [ j ] = h ; ret [ j ] [ i ] = h ; } } return ret ; }
@see "S.Boyd and L.Vandenberghe, Convex Optimization, p. 618"