Skip to content

Commit

Permalink
KrancTensor.m: Implement DeleteDuplicates for older Mathematica versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Sep 29, 2011
1 parent 18cf85f commit 89a1637
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tools/CodeGen/KrancTensor.m
Expand Up @@ -79,10 +79,13 @@
CollectList -> ExpandComponents,
Equations -> ExpandComponents}];

deleteDuplicates[l_] :=
Split[Sort[l]][[All, 1]];

makeGroupExplicit[g_] :=
Module[{variables, newVariables, newGroup},
variables = groupVariables[g];
newVariables = DeleteDuplicates[ExpandComponents[variables]];
newVariables = deleteDuplicates[ExpandComponents[variables]];
newGroup = SetGroupVariables[g, newVariables];
newGroup];

Expand Down

0 comments on commit 89a1637

Please sign in to comment.