Valery,
I've committed 2 small changes which enable tensor/tests/itest.mac
to succeed. I didn't look at ctensor or atensor.
Here is the log message and the diff. I'll post some comments
in a moment.
Robert
Make changes to tensor code so that tests/itest.mac succeeds.
We may or may not choose to keep these changes,
so I am committing these so other people can take a look.
- itensor.lisp: return (VALUES <FOO> T) instead of just <FOO> because
rules code has been modified to look for separate flag (the second
value) to determine if the rule has a match.
- lckdt.mac: change definition of lc2kdt so that summation index is
i% instead of i (avoids name collision).'
Index: itensor.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima/share/tensor/itensor.lisp,v
retrieving revision 1.55
diff -u -r1.55 itensor.lisp
--- itensor.lisp 4 Feb 2006 16:48:18 -0000 1.55
+++ itensor.lisp 25 May 2006 05:33:31 -0000
@@ -1973,9 +1973,9 @@
(SETQ NN ($LENGTH L1))
(SETQ L NIL)
(DO ((I NN (1- I))) ((< I 1)) (SETQ L (CONS ($IDUMMY) L) N $ICOUNTER))
- (RETURN (LIST '(MTIMES SIMP) ($KDELTA L1 (CONS SMLIST L))
+ (RETURN (values (LIST '(MTIMES SIMP) ($KDELTA L1 (CONS SMLIST L))
(LIST (CONS (CAAR E) '(SIMP)) (CONS SMLIST L) (NCONS SMLIST))
- (LIST '(MEXPT SIMP) (MEVAL (LIST 'MFACTORIAL NN)) -1))
+ (LIST '(MEXPT SIMP) (MEVAL (LIST 'MFACTORIAL NN)) -1)) t)
)
)
)
@@ -1993,9 +1993,9 @@
(SETQ NN ($LENGTH L2))
(SETQ L NIL)
(DO ((I NN (1- I))) ((< I 1)) (SETQ L (CONS ($IDUMMY) L) N $ICOUNTER))
- (RETURN (LIST '(MTIMES SIMP) ($KDELTA (CONS SMLIST L) L2)
+ (RETURN (values (LIST '(MTIMES SIMP) ($KDELTA (CONS SMLIST L) L2)
(LIST (CONS (CAAR E) '(SIMP)) (NCONS SMLIST) (CONS SMLIST L))
- (LIST '(MEXPT SIMP) (MEVAL (LIST 'MFACTORIAL NN)) -1))
+ (LIST '(MEXPT SIMP) (MEVAL (LIST 'MFACTORIAL NN)) -1)) t)
)
)
)
Index: lckdt.mac
===================================================================
RCS file: /cvsroot/maxima/maxima/share/tensor/lckdt.mac,v
retrieving revision 1.9
diff -u -r1.9 lckdt.mac
--- lckdt.mac 5 May 2005 12:40:36 -0000 1.9
+++ lckdt.mac 25 May 2006 05:33:31 -0000
@@ -27,7 +27,7 @@
*/
lc2kdt(exp):=block(
[exp:expand(exp),n:nterms(exp)],
- sum(_lc2kdt0(if n>1 then part(exp,i) else exp),i,1,n)
+ sum(_lc2kdt0(if n>1 then part(exp,i%) else exp),i%,1,n)
);
/*