% rotation matrix: matrix vector multiplication
%
% (c) by Hannes Nickisch, MPI for Biological Cybernetics, 2011 February 11

function y = mvm(A,x,ctransp)

  if A.di
    if ctransp, y = d(A.W,A.di)'*x(:); else y = d(A.W,A.di)*x(:); end
  else
    if ctransp, y = A.W'*x(:); else y = A.W *x(:); end
  end