Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fd7a701e authored by hhakim's avatar hhakim
Browse files

Update matfaust LazyLinearOp(/Kron).mtimes to evaluate the result of this * op...

Update matfaust LazyLinearOp(/Kron).mtimes to evaluate the result of this * op if of is a sparse matrix (as made for op a full array).
parent 39a21e17
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,7 @@ classdef LazyLinearOp
else
new_size = [size(L, 1), size(op, 2)];
end
if ~ LazyLinearOp.isLazyLinearOp(op) && ismatrix(op) && isnumeric(op) && ~ issparse(op) && any(size(op) ~= [1, 1])
if ~ LazyLinearOp.isLazyLinearOp(op) && ismatrix(op) && isnumeric(op) && any(size(op) ~= [1, 1])
% op is a dense matrix that is not limited to one element
Lm = eval(L) * op;
else
......
......@@ -70,7 +70,7 @@ classdef LazyLinearOpKron < matfaust.lazylinop.LazyLinearOp
else
new_size = [size(LK, 1), size(op, 2)];
end
if ~ LazyLinearOp.isLazyLinearOp(op) && ismatrix(op) && isnumeric(op) && ~ issparse(op) && any(size(op) ~= [1, 1]) && any(ismember(methods(op), 'reshape')) && any(ismember(methods(op), 'mtimes')) %&& any(ismember(methods(op), 'subsref'))
if ~ LazyLinearOp.isLazyLinearOp(op) && ismatrix(op) && isnumeric(op) && any(size(op) ~= [1, 1]) && any(ismember(methods(op), 'reshape')) && any(ismember(methods(op), 'mtimes')) %&& any(ismember(methods(op), 'subsref'))
% op is a dense matrix that is not limited to one element
LmK = zeros(new_size);
A = LK.A;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment