Skip to content

Commit

Permalink
refactor: convertToIrrev speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
edkerk committed Dec 20, 2021
1 parent 20cfb21 commit 66d55f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/convertToIrrev.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
% Usage: irrevModel=convertToIrrev(model,rxns)

if nargin<2
rxns=model.rxns;
I=true(numel(model.rxns),1);
else
I=getIndexes(model,rxns,'rxns',true);
end

irrevModel=model;

I=getIndexes(model,rxns,'rxns',true);

revIndexesBool=model.rev~=0 & I;
revIndexes=find(revIndexesBool);
if any(revIndexesBool)
Expand Down

0 comments on commit 66d55f2

Please sign in to comment.