function [ f ] = log_likelihood_alspgrad_2( A, T, X)

epsilon = 1e-10;

X_new = X;% + epsilon;

%f = sum(A*X_new) - T * log(A*X_new) + t*sum(X_new); % T is the reads number,corresponding to x in the paper


temp = A*X_new+epsilon;
temp_log = log(temp);
%temp_log(isinf(temp_log)) = 0;

f = sum(temp) - T * temp_log;