function B=TP(m,n,P,A)
%function B=TP(m,n,P,A)
%  evaluate the compl. pos. operator T defined by P on A
%INPUT/OUTPUT:  n,m order of input A and output B
B=zeros(m);
for ss=1:n,
	for tt=ss:n,
		temp=A(ss,tt)*P((ss-1)*m+1:ss*m,(tt-1)*m+1:tt*m);
		if ss<tt,
			temp=temp+temp';
		end
		B=B+temp;
	end
end
