diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-10-21 08:29:02 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-10-21 08:29:02 +0200 |
commit | 4afe01326f6d81ea681cebfd54570a5d13884678 (patch) | |
tree | f53135589edb283a3441ef536b575027690c9c98 /Tools | |
parent | 89a16379672be072fd18c9a805c03e766691c3d3 (diff) |
KrancTensor.m: Replace deleteDuplicates with a version which does not reorder elements
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CodeGen/KrancTensor.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/CodeGen/KrancTensor.m b/Tools/CodeGen/KrancTensor.m index 4318453..6849fc9 100644 --- a/Tools/CodeGen/KrancTensor.m +++ b/Tools/CodeGen/KrancTensor.m @@ -79,8 +79,9 @@ makeCalculationExplicit[calc_] := CollectList -> ExpandComponents, Equations -> ExpandComponents}]; +(* DeleteDuplicates is not available in Mathematica before version 7 *) deleteDuplicates[l_] := - Split[Sort[l]][[All, 1]]; + Tally[Join@l][[All, 1]]; makeGroupExplicit[g_] := Module[{variables, newVariables, newGroup}, |