% This computes function value for IPM_DK. 
%
% Jan 12, 2012

function [fval,W,KtinvX,invX] = function_value(X,w,K,mu)

[V,D] = svd(X);
invX = V*diag(diag(D).^(-1))*V';
KtinvX = K'*invX;
W = KtinvX*K;
D = svd(W);

fval = sum(log(D)) - mu*sum(log(w)) - mu*log(1-sum(w));

