Skip to content

Commit

Permalink
adaptation of tensor toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwu-li committed Nov 9, 2021
1 parent 9e5cb6e commit f8c4890
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ext/tensor_toolbox/@sptensor/ttm.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@
% dense matrix
Z = double(Xnt) * V.';

if nnz(Z) <= 1.0 * prod(siz) % SSMTool need sptensor
% if nnz(Z) <= 1.0 * prod(siz) % SSMTool need sptensor
% Final result is a *sparse* tensor
Ynt = sptenmat(Z, rdims, cdims, siz);
Y = sptensor(Ynt);
else
% Final result is a *dense* tensor
Ynt = tenmat(Z, rdims, cdims, siz);
Y = tensor(Ynt);
end
% else
% % Final result is a *dense* tensor
% Ynt = tenmat(Z, rdims, cdims, siz);
% Y = tensor(Ynt);
% end

end

0 comments on commit f8c4890

Please sign in to comment.