%box product k-th (k=0,1,2,...) power of m-th order, n-dimensional tensor A
function C=bpow(A,k)
s=size(A);
if k==0
    C=eyet(s);
elseif k==1
    C=A;
else
    C=bprod(A,A);
    for i=1:k-2
        C=bprod(C,A);
    end
end
