Skip to content

Commit

Permalink
Fixed a bug that caused wrong reaction reversibility assignments afte…
Browse files Browse the repository at this point in the history
…r gene and reaction removal.
  • Loading branch information
phantomas1234 committed Nov 19, 2013
1 parent 48e661f commit ed8e764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Toolbox/Core.m
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@

Unprotect[deleteIndicesKeepConsistent];
deleteIndicesKeepConsistent::usage="Remove indices from a list of indices and change the resulting list of indices appropriately."
deleteIndicesKeepConsistent[indices_List,indices2delete_List]:=Fold[DeleteCases[#1,#2]/.i_Integer/;i>#2:>i-1&,Union@Sort[indices],Union@Sort[indices2delete]]
deleteIndicesKeepConsistent[indices_List,indices2delete_List]:=Fold[DeleteCases[#1,#2]/.i_Integer/;i>#2:>i-1&,Sort@Union[indices],MapIndexed[#-(First@#2-1)&,Sort@Union@indices2delete]];
def:deleteIndicesKeepConsistent[___]:=(Message[Toolbox::badargs,deleteIndicesKeepConsistent,Defer@def];Abort[])
Protect[deleteIndicesKeepConsistent];

Expand Down

0 comments on commit ed8e764

Please sign in to comment.