Dear All,
I just learnt from hep-th/9507133 that it is possible and useful to
consider Clifford algebras defined from a bilinear form which is not
necessarily symmetric. Since present code never actually uses a
symmetry of defined metrics I propose to drop such an assumption from
anywhere. I include the corresponding patch (which accumulates my
previous submission for idx.cpp as well).
Best,
Vladimir
--
Vladimir V. Kisil email: kisilv(a)maths.leeds.ac.uk
-- www: http://maths.leeds.ac.uk/~kisilv/
Index: doc/tutorial/ginac.texi
===================================================================
RCS file: /home/cvs/GiNaC/doc/tutorial/ginac.texi,v
retrieving revision 1.159
diff -r1.159 ginac.texi
3179,3180c3179,3181
< @samp{e~i e~j + e~j e~i = B(i, j)} for some symmetric matrix (@code{metric})
< @math{B(i, j)}. Such generators are created by the function
---
> @samp{e~i e~j + e~j e~i = B(i, j)} for some matrix (@code{metric})
> @math{B(i, j)}, which may be non-symmetric. Such generators are created
> by the function
Index: ginac/clifford.h
===================================================================
RCS file: /home/cvs/GiNaC/ginac/clifford.h,v
retrieving revision 1.53
diff -r1.53 clifford.h
194c194
< * @param metr Metric (should be of class tensmetric or a derived class, or a symmetric matrix)
---
> * @param metr Metric (should be of class tensmetric or a derived class, or a matrix)
291c291
< * @param metr Metric (should be of class tensmetric or a derived class, or a symmetric matrix)
---
> * @param metr Metric (should be of class tensmetric or a derived class, or a matrix)
Index: ginac/clifford.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/clifford.cpp,v
retrieving revision 1.82
diff -r1.82 clifford.cpp
158c158
< return indexed(metric, symmetric2(), i, j);
---
> return indexed(metric, i, j);
1114c1114
< S = S * e.op(j).subs(lst(ex_to<varidx>(*it) == ival, ex_to<varidx>(*it).toggle_variance() == ival), subs_options::no_pattern);
---
> S = S * e.op(j).subs(lst(ex_to<varidx>(*it) == ival), subs_options::no_pattern);
Index: ginac/idx.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/idx.cpp,v
retrieving revision 1.62
diff -r1.62 idx.cpp
508a509,519
> // Auxiliary comparison which does not mind the variance of indices
> struct idx_is_less : public std::binary_function<ex, ex, bool> {
> bool operator() (const ex &lh, const ex &rh) const {
> if (is_a<varidx>(lh))
> return (lh.compare(rh) < 0) &&
> (lh.compare(ex_to<varidx>(rh).toggle_variance()) < 0);
> else
> return lh.compare(rh) < 0;
> }
> };
>
528c539
< shaker_sort(v.begin(), v.end(), ex_is_less(), ex_swap());
---
> shaker_sort(v.begin(), v.end(), idx_is_less(), ex_swap());
#
Dear All,
Presently the method get_dummy_indices() has a non-intuitive
behaviour that it forgets about variance of indices and return all
of them dotted. This is illustrated by the test included after the
signature.
This can be altered in many they and include a patch to idx.cpp which
uses a sorting rule indifferent to variance of indices. If this patch
is applied than a small simplification to clifford.cpp can be done as
well.
Best wishes,
Vladimir
--
Vladimir V. Kisil email: kisilv(a)maths.leeds.ac.uk
-- www: http://maths.leeds.ac.uk/~kisilv/
##include <iostream>
##include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main()
{
varidx mu(symbol("mu"), 4);
varidx nu(symbol("nu"), 4, true);
symbol A("A");
symbol B("B");
ex e = indexed(A, nu, mu);
ex e1 = indexed(B, nu.toggle_variance(), mu.toggle_variance());
lst rl = lst(mu, nu);
cout << rl << endl;
// -> {~mu,.nu}
exvector ind_vec = ex_to<indexed>(e).get_dummy_indices(ex_to<indexed>(e1));
for (exvector::const_iterator it = ind_vec.begin(); it != ind_vec.end(); it++) {
cout << ex_to<varidx>(*it) << endl;
// -> .nu .mu
}
return 0;
}
#
Dear All,
Presently the method get_dummy_indices() has a non-intuitive
behaviour that it forgets about variance of indices and return all
of them dotted. This is illustrated by the test:
#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main()
{
varidx mu(symbol("mu"), 4);
varidx nu(symbol("nu"), 4, true);
symbol A("A");
symbol B("B");
ex e = indexed(A, nu, mu);
ex e1 = indexed(B, nu.toggle_variance(), mu.toggle_variance());
lst rl = lst(mu, nu);
cout << rl << endl;
// -> {~mu,.nu}
exvector ind_vec = ex_to<indexed>(e).get_dummy_indices(ex_to<indexed>(e1));
for (exvector::const_iterator it = ind_vec.begin(); it != ind_vec.end(); it++) {
cout << ex_to<varidx>(*it) << endl;
// -> .nu .mu
}
return 0;
}
This can be altered in many they and include a patch to idx.cpp which
uses a sorting rule indifferent to variance of indices. If this patch
is applied than a small simplification to clifford.cpp can be done as
well.
With this patches my program seems to run 1.5% faster as well ;-)
Best wishes,
Vladimir
--
Vladimir V. Kisil email: kisilv(a)maths.leeds.ac.uk
-- www: http://maths.leeds.ac.uk/~kisilv/
Index: ginac/clifford.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/clifford.cpp,v
retrieving revision 1.82
diff -r1.82 clifford.cpp
1114c1114
< S = S * e.op(j).subs(lst(ex_to<varidx>(*it) == ival, ex_to<varidx>(*it).toggle_variance() == ival), subs_options::no_pattern);
---
> S = S * e.op(j).subs(lst(ex_to<varidx>(*it) == ival), subs_options::no_pattern);
Index: ginac/idx.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/idx.cpp,v
retrieving revision 1.62
diff -r1.62 idx.cpp
508a509,519
> // Auxiliary comparison which does not mind the variance of indices
> struct idx_is_less : public std::binary_function<ex, ex, bool> {
> bool operator() (const ex &lh, const ex &rh) const {
> if (is_a<varidx>(lh))
> return (lh.compare(rh) < 0) &&
> (lh.compare(ex_to<varidx>(rh).toggle_variance()) < 0);
> else
> return lh.compare(rh) < 0;
> }
> };
>
528c539
< shaker_sort(v.begin(), v.end(), ex_is_less(), ex_swap());
---
> shaker_sort(v.begin(), v.end(), idx_is_less(), ex_swap());
Good evening,
It is my pleasure to announce the release of CLN 1.1.9. This is a
maintenance release without any funky new features or any
incompatibilities whatsoever. There is no reason for an immediate
upgrade if you have been lucky with CLN 1.1.8. To quote NEWS file:
Algorithmic changes
-------------------
* Input of numbers in bases 2, 4, 8, 16 and 32 is now done in linear bit
complexity as opposed to O(N^2). Useful for all kinds of persistency.
Implementation changes
----------------------
* Fixed several bugs in the integer input and output routines that could be
blamed for random crashes in the following cases: output in base 32 for
quite large numbers, input in base 2 for fixnums and input in base 3 for
fixnums on a 64 bit target.
* Fixed crash when radix specifiers were used in input streams.
* Speed up on x86_64 and ia64 by adding some inline assembly.
Other changes
-------------
* Fixes for compilation on MacOS X and little endian Mips.
You may download the source tarball via anonymous FTP from
<ftp://ftpthep.physik.uni-mainz.de/pub/gnu/cln-1.1.9.tar.bz2>.
Happy hacking
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>