Prerequisites
=============
-GiNaC requires the CLN library by Bruno Haible, available at
-<ftp://ftp.santafe.eu/pub/gnu/> or <ftp://ftp.ilog.fr/pub/Users/haible/gnu/>.
-You will also need a good C++ compiler adhering to the ANSI standard (we
-used gcc for development so if you have a different compiler you are on
-your own).
+GiNaC requires the CLN library by Bruno Haible, available at either
+one of the following FTP-sites:
+ * <ftp://ftp.santafe.edu/pub/gnu/>,
+ * <ftp://ftp.ilog.fr/pub/Users/haible/gnu/> or
+ * <ftp://ftpthep.physik.uni-mainz.de/pub/gnu/>.
+You will also need a decent ANSI-compliant C++-compiler. We use
+`post-EGCS' GCC, i.e GCC >= 2.95 for development so if you have a
+different compiler you are on your own. Note that you may have to use
+the same compiler you compiled CLN with because of differing
+name-mangling schemes.
+
+Optionally, GiNaC may work together with Masaharu Goto's C++
+interpreter cint (which requires that you register for commercial
+use). You may obtain it from
+ * <ftp://root.cern.ch/root/>.
+Install it by following the instructions included in Cint's
+distribution before trying to compile GiNaC-cint. (See section
+`Working with the Cint C++ interpreter' below.)
Installation
added in V1.0.3 so it won't continue with earlier versions anyhow.
Please install CLN properly on your system before continuing with
GiNaC.
+
+
+Working with the Cint C++ interpreter
+=====================================
+
+You need to specify
+ --with-cint=$CINTSYSDIR
+...
## Process this file with automake to produce Makefile.in
-SUBDIRS = ginac check ginsh tools doc
+SUBDIRS = @GINACCINTDIR@ ginac check ginsh tools doc
# Requires automake 1.4
AUTOMAKE_OPTIONS = 1.4
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
VERSION = @VERSION@
YACC = @YACC@
-SUBDIRS = ginac check ginsh tools doc
+SUBDIRS = @GINACCINTDIR@ ginac check ginsh tools doc
# Requires automake 1.4
AUTOMAKE_OPTIONS = 1.4
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
This file records noteworthy changes.
0.4.0 (26 November 1999)
-* First public release
+* First public release.
0.4.1 (13 December 1999)
* Series Expansion of Gamma function and some other trigonometric
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static unsigned check_diff(const ex &e, const symbol &x,
const ex &d, unsigned nth=1)
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#define VECSIZE 100
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/* Some tests on the sine trigonometric function. */
static unsigned inifcns_consist_sin(void)
#include <stdexcept>
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static unsigned lortensor_check1(void)
{
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
unsigned lsolve_onedim(void)
{
#include <stdexcept>
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static unsigned matrix_determinants(void)
{
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static symbol x("x"), y("y"), z("z");
#include <stdlib.h>
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/* Simple and maybe somewhat pointless consistency tests of assorted tests and
* conversions. */
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
unsigned numeric_output(void)
{
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// The very first pair of historic problems had its roots in power.cpp and was
// finally resolved on April 27th. (Fixing the first on April 23rd actually
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
const int MAX_VARIABLES = 5;
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static unsigned powerlaws1(void)
{
#include <ginac/ginac.h>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
static symbol x("x");
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = ginaccint
+noinst_LIBRARIES = libginac.a
+ginaccint_SOURCES = ginaccint.cpp dummies.cpp dummies.h
+man_MANS = ginaccint.1
+
+# Build a modified library in the ginac-subdir and put it into the cint-subdir:
+libginac.a:
+ (cd ../ginac && \
+ $(MAKE) clean; \
+ $(MAKE) CXXFLAGS="$$CXXFLAGS -DNO_NAMESPACE_GINAC" && \
+ $(MAKE) install-libLTLIBRARIES prefix=`pwd`/../cint libdir=`pwd`/../cint && \
+ $(MAKE) clean)
+
+ginaccint: libginac.a ginaccint.cpp
+ $(MAKE) -f Makefile.makecint
+
+EXTRA_DIST = dummies.pl
+
+# Files which are generated by perl scripts
+$(srcdir)/dummies.h $(srcdir)/dummies.cpp: $(srcdir)/dummies.pl
+ cd $(srcdir) && perl dummies.pl
+
+# Force build of headers before compilation
+$(srcdir)/ginaccint.cpp: $(srcdir)/dummies.h
--- /dev/null
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+ARCHIVE_AGE = @ARCHIVE_AGE@
+ARCHIVE_VERSION = @ARCHIVE_VERSION@
+AS = @AS@
+CC = @CC@
+CINT = @CINT@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DVIPS = @DVIPS@
+FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
+GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
+GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
+GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
+GINACLIB_LIBS = @GINACLIB_LIBS@
+GINACLIB_MAJOR_VERSION = @GINACLIB_MAJOR_VERSION@
+GINACLIB_MICRO_VERSION = @GINACLIB_MICRO_VERSION@
+GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
+GINACLIB_VERSION = @GINACLIB_VERSION@
+GINSH_LIBS = @GINSH_LIBS@
+LATEX = @LATEX@
+LD = @LD@
+LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKECINT = @MAKECINT@
+MAKEINDEX = @MAKEINDEX@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+REFERENCE_TARGETS = @REFERENCE_TARGETS@
+TUTORIAL_TARGETS = @TUTORIAL_TARGETS@
+VERSION = @VERSION@
+YACC = @YACC@
+
+bin_PROGRAMS = ginaccint
+noinst_LIBRARIES = libginac.a
+ginaccint_SOURCES = ginaccint.cpp dummies.cpp dummies.h
+man_MANS = ginaccint.1
+
+EXTRA_DIST = dummies.pl
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libginac_a_LIBADD =
+libginac_a_SOURCES = libginac.a.c
+libginac_a_OBJECTS = libginac.a.o
+AR = ar
+PROGRAMS = $(bin_PROGRAMS)
+
+ginaccint_OBJECTS = ginaccint.o dummies.o
+ginaccint_LDADD = $(LDADD)
+ginaccint_DEPENDENCIES =
+ginaccint_LDFLAGS =
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
+
+NROFF = nroff
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES = .deps/dummies.P .deps/ginaccint.P .deps/libginac.a.P
+SOURCES = libginac.a.c $(ginaccint_SOURCES)
+OBJECTS = libginac.a.o $(ginaccint_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cpp .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu cint/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+.cpp.o:
+ $(CXXCOMPILE) -c $<
+.cpp.lo:
+ $(LTCXXCOMPILE) -c $<
+
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = cint
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu cint/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+
+%.o: %.cpp
+ @echo '$(CXXCOMPILE) -c $<'; \
+ $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.cpp
+ @echo '$(LTCXXCOMPILE) -c $<'; \
+ $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am: install-man
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-binPROGRAMS \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
+ clean-binPROGRAMS clean-tags clean-depend clean-generic \
+ mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-noinstLIBRARIES distclean-compile \
+ distclean-libtool distclean-binPROGRAMS distclean-tags \
+ distclean-depend distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-binPROGRAMS maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-binPROGRAMS \
+distclean-binPROGRAMS clean-binPROGRAMS maintainer-clean-binPROGRAMS \
+uninstall-binPROGRAMS install-binPROGRAMS install-man1 uninstall-man1 \
+install-man uninstall-man tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir mostlyclean-depend \
+distclean-depend clean-depend maintainer-clean-depend info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Build a modified library in the ginac-subdir and put it into the cint-subdir:
+libginac.a:
+ (cd ../ginac && \
+ $(MAKE) clean; \
+ $(MAKE) CXXFLAGS="$$CXXFLAGS -DNO_NAMESPACE_GINAC" && \
+ $(MAKE) install-libLTLIBRARIES prefix=`pwd`/../cint libdir=`pwd`/../cint && \
+ $(MAKE) clean)
+
+ginaccint: libginac.a ginaccint.cpp
+ $(MAKE) -f Makefile.makecint
+
+# Files which are generated by perl scripts
+$(srcdir)/dummies.h $(srcdir)/dummies.cpp: $(srcdir)/dummies.pl
+ cd $(srcdir) && perl dummies.pl
+
+# Force build of headers before compilation
+$(srcdir)/ginaccint.cpp: $(srcdir)/dummies.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+++ /dev/null
-#!/bin/sh
-
-echo
-echo "GiNaCcint configure script"
-echo "--------------------------"
-echo
-echo "Warning: this is not a sophisticated GNU configure script!"
-echo
-echo "It tests if cint is installed"
-echo "What it does NOT check:"
-echo " the ginac source files (e.g. ginac.h) must be in ../ginac"
-echo " libginac must have been compiled with -D NO_GINAC_NAMESPACE"
-echo " libginac.a or libginac.so must be found in ../ginac/.libs"
-echo " libcln.a or libcln.so must be in the standard link path"
-echo
-
-if [ X"$CINTSYSDIR"X = "XX" ]; then
- echo "ERROR: cint does not seem to be installed (\$CINTSYSDIR not set)"
- exit
-fi;
-echo "ok, cint seems to be installed (\$CINTSYSDIR = $CINTSYSDIR)"
-
-if [ X`which cint`X = "XX" ]; then
- echo "ERROR: cint not in \$PATH"
- exit
-fi;
-echo "ok, cint seems to be in \$PATH"
-
-makecint -mk Makefile -o ginaccint -m \
- -D OBSCURE_CINT_HACK -D NO_GINAC_NAMESPACE \
- -I .. -I $CINTSYSDIR \
- -m -H ../ginac/ginac.h -H cint_workaround.h \
- -C++ dummy_ginsh.cpp -C++ ginaccint.cpp \
- -l ../ginac/.libs/libginac.a -lcln \
- -cint -M0x10
-echo "ok, makecint has created the Makefile"
-
-echo
-echo "Configuration done. Now type \"make\"."
-echo "(please ignore template warnings about 'statement with no effect')"
-
--- /dev/null
+/* dummies.cpp
+ *
+ * Dummies and stubs to overcome certain deficiencies of Cint.
+ * This file was generated automatically by dummies.pl.
+ * Please do not modify it directly, edit the perl script instead!
+ */
+
+#include <ginac/function.h>
+
+#ifndef NO_NAMESPACE_GINAC
+using namespace GiNaC;
+#endif // ndef NO_NAMESPACE_GINAC
+
+void ginsh_get_ginac_functions(void) { }
--- /dev/null
+/* dummies.h
+ *
+ * Dummies and wrappers to overcome certain deficiencies of Cint.
+ * This file was generated automatically by dummies.pl.
+ * Please do not modify it directly, edit the perl script instead!
+ */
+
+// fixes for sin(x)
+inline ex sin(symbol const & x) { return sin(ex(x)); }
+inline ex sin(function const & x) { return sin(ex(x)); }
+inline ex sin(constant const & x) { return sin(ex(x)); }
+inline ex sin(idx const & x) { return sin(ex(x)); }
+inline ex sin(lorentzidx const & x) { return sin(ex(x)); }
+inline ex sin(coloridx const & x) { return sin(ex(x)); }
+
+// fixes for cos(x)
+inline ex cos(symbol const & x) { return cos(ex(x)); }
+inline ex cos(function const & x) { return cos(ex(x)); }
+inline ex cos(constant const & x) { return cos(ex(x)); }
+inline ex cos(idx const & x) { return cos(ex(x)); }
+inline ex cos(lorentzidx const & x) { return cos(ex(x)); }
+inline ex cos(coloridx const & x) { return cos(ex(x)); }
+
+// fixes for tan(x)
+inline ex tan(symbol const & x) { return tan(ex(x)); }
+inline ex tan(function const & x) { return tan(ex(x)); }
+inline ex tan(constant const & x) { return tan(ex(x)); }
+inline ex tan(idx const & x) { return tan(ex(x)); }
+inline ex tan(lorentzidx const & x) { return tan(ex(x)); }
+inline ex tan(coloridx const & x) { return tan(ex(x)); }
+
+// fixes for asin(x)
+inline ex asin(symbol const & x) { return asin(ex(x)); }
+inline ex asin(function const & x) { return asin(ex(x)); }
+inline ex asin(constant const & x) { return asin(ex(x)); }
+inline ex asin(idx const & x) { return asin(ex(x)); }
+inline ex asin(lorentzidx const & x) { return asin(ex(x)); }
+inline ex asin(coloridx const & x) { return asin(ex(x)); }
+
+// fixes for acos(x)
+inline ex acos(symbol const & x) { return acos(ex(x)); }
+inline ex acos(function const & x) { return acos(ex(x)); }
+inline ex acos(constant const & x) { return acos(ex(x)); }
+inline ex acos(idx const & x) { return acos(ex(x)); }
+inline ex acos(lorentzidx const & x) { return acos(ex(x)); }
+inline ex acos(coloridx const & x) { return acos(ex(x)); }
+
+// fixes for atan(x)
+inline ex atan(symbol const & x) { return atan(ex(x)); }
+inline ex atan(function const & x) { return atan(ex(x)); }
+inline ex atan(constant const & x) { return atan(ex(x)); }
+inline ex atan(idx const & x) { return atan(ex(x)); }
+inline ex atan(lorentzidx const & x) { return atan(ex(x)); }
+inline ex atan(coloridx const & x) { return atan(ex(x)); }
+
+// fixes for exp(x)
+inline ex exp(symbol const & x) { return exp(ex(x)); }
+inline ex exp(function const & x) { return exp(ex(x)); }
+inline ex exp(constant const & x) { return exp(ex(x)); }
+inline ex exp(idx const & x) { return exp(ex(x)); }
+inline ex exp(lorentzidx const & x) { return exp(ex(x)); }
+inline ex exp(coloridx const & x) { return exp(ex(x)); }
+
+// fixes for log(x)
+inline ex log(symbol const & x) { return log(ex(x)); }
+inline ex log(function const & x) { return log(ex(x)); }
+inline ex log(constant const & x) { return log(ex(x)); }
+inline ex log(idx const & x) { return log(ex(x)); }
+inline ex log(lorentzidx const & x) { return log(ex(x)); }
+inline ex log(coloridx const & x) { return log(ex(x)); }
+
+// fixes for sqrt(x)
+inline ex sqrt(symbol const & x) { return sqrt(ex(x)); }
+inline ex sqrt(function const & x) { return sqrt(ex(x)); }
+inline ex sqrt(constant const & x) { return sqrt(ex(x)); }
+inline ex sqrt(idx const & x) { return sqrt(ex(x)); }
+inline ex sqrt(lorentzidx const & x) { return sqrt(ex(x)); }
+inline ex sqrt(coloridx const & x) { return sqrt(ex(x)); }
+
+// fixes for sinh(x)
+inline ex sinh(symbol const & x) { return sinh(ex(x)); }
+inline ex sinh(function const & x) { return sinh(ex(x)); }
+inline ex sinh(constant const & x) { return sinh(ex(x)); }
+inline ex sinh(idx const & x) { return sinh(ex(x)); }
+inline ex sinh(lorentzidx const & x) { return sinh(ex(x)); }
+inline ex sinh(coloridx const & x) { return sinh(ex(x)); }
+
+// fixes for cosh(x)
+inline ex cosh(symbol const & x) { return cosh(ex(x)); }
+inline ex cosh(function const & x) { return cosh(ex(x)); }
+inline ex cosh(constant const & x) { return cosh(ex(x)); }
+inline ex cosh(idx const & x) { return cosh(ex(x)); }
+inline ex cosh(lorentzidx const & x) { return cosh(ex(x)); }
+inline ex cosh(coloridx const & x) { return cosh(ex(x)); }
+
+// fixes for tanh(x)
+inline ex tanh(symbol const & x) { return tanh(ex(x)); }
+inline ex tanh(function const & x) { return tanh(ex(x)); }
+inline ex tanh(constant const & x) { return tanh(ex(x)); }
+inline ex tanh(idx const & x) { return tanh(ex(x)); }
+inline ex tanh(lorentzidx const & x) { return tanh(ex(x)); }
+inline ex tanh(coloridx const & x) { return tanh(ex(x)); }
+
+// fixes for abs(x)
+inline ex abs(symbol const & x) { return abs(ex(x)); }
+inline ex abs(function const & x) { return abs(ex(x)); }
+inline ex abs(constant const & x) { return abs(ex(x)); }
+inline ex abs(idx const & x) { return abs(ex(x)); }
+inline ex abs(lorentzidx const & x) { return abs(ex(x)); }
+inline ex abs(coloridx const & x) { return abs(ex(x)); }
+
+// fixes for pow(x,y)
+inline ex pow(symbol const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(symbol const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(function const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(constant const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(idx const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(lorentzidx const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(coloridx const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,symbol const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,function const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,constant const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,idx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,lorentzidx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,coloridx const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(ex const & x,numeric const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(ex const & x,int const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(ex const & x,double const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(numeric const & x,ex const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(int const & x,ex const & y) {
+ return pow(ex(x),ex(y));
+}
+inline ex pow(double const & x,ex const & y) {
+ return pow(ex(x),ex(y));
+}
+
+// fixes for atan2(x,y)
+inline ex atan2(symbol const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(symbol const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(function const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(constant const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(idx const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(lorentzidx const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(coloridx const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,symbol const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,function const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,constant const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,idx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,lorentzidx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,coloridx const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(ex const & x,numeric const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(ex const & x,int const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(ex const & x,double const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(numeric const & x,ex const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(int const & x,ex const & y) {
+ return atan2(ex(x),ex(y));
+}
+inline ex atan2(double const & x,ex const & y) {
+ return atan2(ex(x),ex(y));
+}
+
-#!/usr/bin/perl -w
+# Create files containing dummies, wrappers and so on to overcome certain
+# deficiencies in Cint. In an ideal world it would be unnecessary.
+
+$header='dummies.h';
+$source='dummies.cpp';
# Generate a header file which is additionally included in cint
# to work around the broken overloading resolution of cint for
-# C library functions
-# e.g. if a function declared as ex sin(ex const & x) and called
+# C library functions and other problems.
+# E.g: if a function declared as ex sin(ex const & x) and called
# with sin(y) where y is a symbol, cint favours a conversion from
# symbol to void * to double over symbol to ex and thus calls the
# C math library function double sin(double x) (sigh!)
-$header='cint_workaround.h';
-
# types which need help to be converted to ex
@types=('symbol','function','constant','idx','lorentzidx','coloridx');
@moretypes=('numeric','int','double');
open OUT,">$header";
+$opening=<<END_OF_OPENING;
+/* dummies.h
+ *
+ * Dummies and wrappers to overcome certain deficiencies of Cint.
+ * This file was generated automatically by dummies.pl.
+ * Please do not modify it directly, edit the perl script instead!
+ */
+
+END_OF_OPENING
+
+print OUT $opening;
+
foreach $f (@functions1p) {
print OUT "// fixes for $f(x)\n";
foreach $t (@types) {
close OUT;
+# Create a file containing stubs that may be necessary because Cint always
+# wants to link against anything that was ever declared:
+
+open OUT,">$source";
+
+$opening=<<END_OF_OPENING;
+/* dummies.cpp
+ *
+ * Dummies and stubs to overcome certain deficiencies of Cint.
+ * This file was generated automatically by dummies.pl.
+ * Please do not modify it directly, edit the perl script instead!
+ */
+
+#include <ginac/function.h>
+
+#ifndef NO_NAMESPACE_GINAC
+using namespace GiNaC;
+#endif // ndef NO_NAMESPACE_GINAC
+
+END_OF_OPENING
+
+print OUT $opening;
+print OUT "void ginsh_get_ginac_functions(void) { }\n";
+
+close OUT;
+# Create dummies
+++ /dev/null
-#include <ginac/function.h>
-
-#ifndef NO_GINAC_NAMESPACE
-using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
-
-void ginsh_get_ginac_functions(void)
-{
-}
-
-ex IEvalf(void)
-{
- return 0;
-}
--- /dev/null
+.TH ginaccint 1 "January, 2000" "GiNaC"
+.SH NAME
+GiNaC-cint \- An interactive interface for GiNaC based on the Cint C/C++ interpreter
+.SH SYNPOSIS
+.B ginaccint
+.SH DESCRIPTION
+.B ginaccint
+is an interactive frontend for the GiNaC symbolic computation
+framework. It is a tool that lets you write interactive programs in
+C++ that directly make use of GiNaC's classes and thus a more complete
+replacement for traditional interactive computer algebra systems than
+\fBginsh\fP(1) is. Programs may be composed as scripts and later compiled
+with the native compiler and linked into the system.
+.SH USAGE
+.SS INPUT FORMAT
+After startup, ginsh displays a prompt signifying that it is ready to
+accept your input. All C++ statements are valid as input, extended by
+GiNaC's numeric or symbolic expressions. E.g.
+.BR fibonacci(24)/1104;
+returns a GiNaC object of class
+.BR ex,
+, which in this case represents the numeric 42. Symbols are declared by
+statements as
+.nf
+GiNaC> symbol x("x"), y("y"), z;
+.fi
+which defines two named symbols and an anonymous one for later usage.
+All GiNaC methods and functions are available as they would be typed
+in C++. It is not necessary to explicitly invoke a print command as
+the last expression is automatically printed:
+.nf
+GiNaC> pow(x+y,4).expand();
+out2 = x^4+4*x^3*y+6*x^2*y^2+4*x*y^3+y^4
+.fi
+Statements are generally closed by either when a closing brace
+.RB ( } )
+matches the first opening brace
+.RB ( { )
+or a semicolon
+.RB ( ; )
+is encountered.
+
+
+.SS FUNCTION DEFINITIONS
+GiNaC-cint must be put into a special mode in order to define a
+function. This is done with the command
+.RB .function .
+After that any function definition in valid C++ syntax may be typed
+in. It becomes immediatly available for usage.
+
+.SH EXAMPLES
+.nf
+GiNaC> symbol x("x"), y("y"), z("z");
+GiNaC> ex a = pow(x,2)-x-2;
+GiNaC> ex b = pow(x+1,2);
+GiNaC> ex s = a/b;
+GiNaC> s.diff(x);
+out1 -2*(1+x)^(-3)*(-2-x+x^2)+(-1+2*x)*(1+x)^(-2)
+GiNaC> s.normal();
+out2 (-2+x)*(1+x)^(-1)
+GiNaC> .function
+next expression can be a function definition
+GiNaC> ex EulerNumber(unsigned n)
+ > {
+ > symbol x;
+ > ex generator = pow(cosh(x),-1);
+ > return generator.diff(x,n).subs(x==0);
+ > }
+creating file /tmp/ginac26197caa
+GiNaC> EulerNumber(42);
+out3 -10364622733519612119397957304745185976310201
+GiNaC> quit;
+.fi
+
+.SH BUGS
+Cint accepts most of K&R and ANSI C/C++ language construct but not
+perfect. In fact, Cint is not aimed to be a 100% ANSI/ISO compliant
+C/C++ language processor. It rather is a portable script language
+environment which is close enough to the standard C++. See the file
+.BR limitati.txt
+in your Cint distribution. Please take the time to track down any bug
+you encounter as far as possible and contact Masaharu Goto
+<MXJ02154@niftyserve.or.jp> for Cint-related bugs and
+<ginac-bugs@ginac.de> for any bugs in the GiNaC engine.
+
+.SH AUTHOR
+.TP
+The GiNaC Group:
+.br
+Christian Bauer <Christian.Bauer@uni-mainz.de>
+.br
+Alexander Frink <Alexander.Frink@uni-mainz.de>
+.br
+Richard Kreckel <Richard.Kreckel@uni-mainz.de>
+.SH SEE ALSO
+GiNaC Tutorial \- An open framework for symbolic computation within the
+C++ programming language
+.PP
+CLN \- A Class Library for Numbers, Bruno Haible
+.PP
+\fBginsh\fP(1)
+.SH COPYRIGHT
+.SS CINT COPYRIGHT
+Copyright \(co of Cint and associated tools are owned by Agilent
+Technologies Japan Company and the author. Acknowledgement to the
+author by e-mail is recommended at installation. Source code, binary
+executable or library of Cint and associated tools can be used,
+modified and distributed free of charge for any purpose provided that
+the copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in documentation.
+Registration is requested, at this moment, for commercial use. Send
+e-mail to the author <MXJ02154@niftyserve.or.jp>. The registration is
+free.
+.SS GINAC COPYRIGHT
+Copyright \(co 1999-2000 Johannes Gutenberg Universit\(:at Mainz, Germany
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
static unsigned out_count=0;
if (TYPES_EQUAL(retval,ref_ex)) {
if (ex::last_created_or_assigned_bp_can_be_converted_to_ex()) {
- string varname="Out"+ToString(++out_count);
+ string varname="out"+ToString(++out_count);
exec_tempfile("ex "+varname+"(*ex::last_created_or_assigned_bp);\n"
+"LLLAST=LLAST;\n"
+"LLAST=LAST;\n"
+"LAST="+varname+";\n"
- +"cout << \""+varname+" = \" << "+varname+" << endl << endl;");
+ +"cout << \""+varname+" \" << "+varname+" << endl << endl;");
} else {
cout << "warning: last_created_or_assigned_bp modified 0 or not evaluated or not dynallocated" << endl;
}
void greeting(void)
{
- cout << "Welcome to GiNaCcint V0.2" << endl << endl;
+ cout << "Welcome to GiNaC-cint V" << VERSION << endl;
+ cout << "This software is provided \"as is\" without any warranty. Copyright of Cint is" << endl
+ << "owned by Agilent Technologies Japan and Masaharu Goto. Registration is" << endl
+ << " __, _______ requested, at this moment, for commercial use. Send e-mail to" << endl
+ << " (__) * | <MXJ02154@niftyserve.or.jp>. The registration is free." << endl
+ << " ._) i N a C | The GiNaC framework is Copyright by Johannes Gutenberg Univ." << endl
+ << "<-------------' Germany and licensed under the terms and conditions of the GPL." << endl << endl;
cout << "To quit, type 'quit;', 'exit;', 'bye;', '.q', '.quit', '.exit' or '.bye'" << endl;
}
bool quit=false;
bool next_command_is_function=false;
while (!quit) {
- strcpy(prompt,"GiNaCcint> ");
+ strcpy(prompt,"GiNaC> ");
int open_braces=0;
bool end_of_command=false;
string command;
end_of_command=true;
}
}
- strcpy(prompt," (more) > ");
+ strcpy(prompt," > ");
}
string stripped_command=strip_whitespace(command);
if ((stripped_command=="quit;")||
GINACLIB_MAJOR_VERSION=0
-GINACLIB_MINOR_VERSION=4
-GINACLIB_MICRO_VERSION=1
+GINACLIB_MINOR_VERSION=5
+GINACLIB_MICRO_VERSION=0
GINACLIB_INTERFACE_AGE=0
-GINACLIB_BINARY_AGE=1
+GINACLIB_BINARY_AGE=0
GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
+LIBGINACCINT=
+GINACCINTDIR=
if [ "x$with_cint" != "xno" ]; then
- echo "with_cint is set to: $with_cint"
- CINTSYSDIR=$with_cint
+ if [ "x$enable_static" != "xyes" ]; then
+ { echo "configure: error: currently GiNaC-cint needs to build a static libginac" 1>&2; exit 1; }
+ fi
+ if [ "x$with_cint" = "xyes" ]; then
+ if [ "x$CINTSYSDIR" = "x" ]; then
+ { echo "configure: error: please export \$CINTSYSDIR or specify --with-cint=CINTSYSDIR" 1>&2; exit 1; }
+ fi
+ else
+ CINTSYSDIR=$with_cint
+ export CINTSYSDIR
+ fi
# Extract the first word of "cint", so it can be a program name with args.
set dummy cint; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2863: checking for $ac_word" >&5
+echo "configure:2874: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CINT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "makecint", so it can be a program name with args.
set dummy makecint; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2899: checking for $ac_word" >&5
+echo "configure:2910: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKECINT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- if [ "$cint" -a "$makecint" ]; then
- echo "$ac_t""Configuring GiNaC-cint" 1>&6
+ if [ "$CINT" -a "$MAKECINT" ]; then
+ echo "$ac_t""creating cint/Makefile" 1>&6
+ (cd cint && \
+ $MAKECINT -mk Makefile.makecint -o ginaccint -m \
+ -D OBSCURE_CINT_HACK -D NO_NAMESPACE_GINAC \
+ -I .. -I $CINTSYSDIR -m -H ../ginac/ginac.h dummies.h \
+ -C++ dummies.cpp -C++ ginaccint.cpp \
+ -l ./libginac.a -lcln -cint -M0x10; \
+ cd ..)
+ LIBGINACCINT="libginac.a"
+ GINACCINTDIR="cint"
else
{ echo "configure: error: Cannot configure GiNaC-cint" 1>&2; exit 1; }
fi
fi
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
doc/Makefile
doc/tutorial/Makefile
doc/reference/Makefile
+cint/Makefile
config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
s%@REFERENCE_TARGETS@%$REFERENCE_TARGETS%g
s%@CINT@%$CINT%g
s%@MAKECINT@%$MAKECINT%g
+s%@LIBGINACCINT@%$LIBGINACCINT%g
+s%@GINACCINTDIR@%$GINACCINTDIR%g
CEOF
EOF
doc/Makefile
doc/tutorial/Makefile
doc/reference/Makefile
+cint/Makefile
"}
EOF
cat >> $CONFIG_STATUS <<\EOF
dnl (don't we all *love* M4?)...
GINACLIB_MAJOR_VERSION=0
-GINACLIB_MINOR_VERSION=4
-GINACLIB_MICRO_VERSION=1
+GINACLIB_MINOR_VERSION=5
+GINACLIB_MICRO_VERSION=0
GINACLIB_INTERFACE_AGE=0
-GINACLIB_BINARY_AGE=1
+GINACLIB_BINARY_AGE=0
GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
AC_SUBST(GINACLIB_MAJOR_VERSION)
AC_SUBST(TUTORIAL_TARGETS)
AC_SUBST(REFERENCE_TARGETS)
-dnl Configure GiNaC-cint, if requested
+dnl Configure GiNaC-cint
+LIBGINACCINT=
+GINACCINTDIR=
if [[ "x$with_cint" != "xno" ]]; then
- echo "with_cint is set to: $with_cint"
- CINTSYSDIR=$with_cint
+ if [[ "x$enable_static" != "xyes" ]]; then
+ AC_MSG_ERROR([currently GiNaC-cint needs to build a static libginac])
+ fi
+ if [[ "x$with_cint" = "xyes" ]]; then
+ if [[ "x$CINTSYSDIR" = "x" ]]; then
+ AC_MSG_ERROR([please export \$CINTSYSDIR or specify --with-cint=CINTSYSDIR])
+ fi
+ else
+ CINTSYSDIR=$with_cint
+ export CINTSYSDIR
+ fi
AC_PATH_PROG(CINT, cint, "", $CINTSYSDIR:$PATH)
AC_PATH_PROG(MAKECINT, makecint, "", $CINTSYSDIR:$PATH)
- if [[ "$cint" -a "$makecint" ]]; then
- AC_MSG_RESULT([Configuring GiNaC-cint])
+ if [[ "$CINT" -a "$MAKECINT" ]]; then
+ AC_MSG_RESULT([creating cint/Makefile])
+ (cd cint && \
+ $MAKECINT -mk Makefile.makecint -o ginaccint -m \
+ -D OBSCURE_CINT_HACK -D NO_NAMESPACE_GINAC \
+ -I .. -I $CINTSYSDIR -m -H ../ginac/ginac.h dummies.h \
+ -C++ dummies.cpp -C++ ginaccint.cpp \
+ -l ./libginac.a -lcln -cint -M0x10; \
+ cd ..)
+ LIBGINACCINT="libginac.a"
+ GINACCINTDIR="cint"
else
AC_MSG_ERROR([Cannot configure GiNaC-cint])
fi
fi
+AC_SUBST(LIBGINACCINT)
+AC_SUBST(GINACCINTDIR)
dnl Output makefiles etc.
AC_OUTPUT([
doc/Makefile
doc/tutorial/Makefile
doc/reference/Makefile
+cint/Makefile
], [chmod +x ginac-config])
echo "Configuration done. Now type \"make\"."
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
-PREDEFINED = NO_GINAC_NAMESPACE
+PREDEFINED = NO_NAMESPACE_GINAC
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-@set UPDATED 21 January 2000
-@set EDITION 0.4.1
-@set VERSION 0.4.1
+@set UPDATED 29 January 2000
+@set EDITION 0.5.0
+@set VERSION 0.5.0
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(add, expairseq)
const add some_add;
const type_info & typeid_add=typeid(some_add);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "expairseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Sum of expressions. */
class add : public expairseq
return static_cast<const add &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_ADD_H__
* Archiving of GiNaC expressions. */
/*
- * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "config.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Archive an expression.
write_unsigned(os, n.props[i].name);
write_unsigned(os, n.props[i].value);
}
+ return os;
}
/** Write archive to binary data stream. */
write_unsigned(os, num_nodes);
for (unsigned int i=0; i<num_nodes; i++)
os << ar.nodes[i];
+ return os;
}
/** Read archive_node from binary data stream. */
n.props[i].name = read_unsigned(is);
n.props[i].value = read_unsigned(is);
}
+ return is;
}
/** Read archive from binary data stream. */
ar.nodes.resize(num_nodes, ar);
for (unsigned int i=0; i<num_nodes; i++)
is >> ar.nodes[i];
+ return is;
}
}
}
+/** Create a dummy archive. The intention is to fill archive_node's default ctor,
+ * which is currently a Cint-requirement. */
+archive* archive_node::dummy_ar_creator(void)
+{
+ static archive* some_ar = new archive;
+ return some_ar;
+}
+
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
* Archiving of GiNaC expressions. */
/*
- * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
class ostream;
class istream;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class lst;
class archive;
friend istream &operator>>(istream &is, archive_node &ar);
public:
+ archive_node() : a(*dummy_ar_creator()), has_expression(false) {}
archive_node(archive &ar) : a(ar), has_expression(false) {}
archive_node(archive &ar, const ex &expr);
~archive_node() {}
void printraw(ostream &os) const;
private:
+ static archive* dummy_ar_creator(void);
+
/** Property data types */
enum property_type {
PTYPE_BOOL,
istream &operator>>(istream &is, archive &ar);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_ARCHIVE_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(basic, void)
int max_recursion_level=1024;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "assertion.h"
#include "registrar.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class basic;
class ex;
// convenience macros
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
#define is_of_type(OBJ,TYPE) \
(dynamic_cast<TYPE *>(const_cast<GiNaC::basic *>(&OBJ))!=0)
#define is_ex_exactly_of_type(OBJ,TYPE) \
((*(OBJ).bp).tinfo()==GiNaC::TINFO_##TYPE)
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
#define is_of_type(OBJ,TYPE) \
(dynamic_cast<TYPE *>(const_cast<basic *>(&OBJ))!=0)
#define is_ex_exactly_of_type(OBJ,TYPE) \
((*(OBJ).bp).tinfo()==TINFO_##TYPE)
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_BASIC_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
const clifford some_clifford;
const type_info & typeid_clifford=typeid(some_clifford);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "indexed.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Base class for clifford object */
class clifford : public indexed
return static_cast<const clifford &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_CLIFFORD_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(color, indexed)
}
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "indexed.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
const unsigned MAX_REPRESENTATION_LABELS = 4;
const unsigned COLOR_EIGHT = 8; // N*N-1
void append_exvector_to_exvector(exvector & dest, const exvector & source);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_COLOR_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(coloridx, idx)
const coloridx some_coloridx;
const type_info & typeid_coloridx=typeid(some_coloridx);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "idx.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class coloridx : public idx
{
return static_cast<const coloridx &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_COLORIDX_H__
#include "archive.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(constant, basic)
* Diverts straight into CLN for evalf(). */
const constant Catalan("Catalan", CatalanEvalf);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <string>
#include "basic.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
typedef ex (*evalffunctype)(void);
extern const constant Catalan;
extern const constant EulerGamma;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_CONSTANT_H__
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// typedef ${STLHEADER}<ex> ${STLT};
typedef ${STLHEADER}<ex,malloc_alloc> ${STLT}; // CINT does not like ${STLHEADER}<...,default_alloc>
return static_cast<const ${CONTAINER} &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_${CONTAINER_UC}_H__
#include "archive.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(${CONTAINER}, basic)
const ${CONTAINER} some_${CONTAINER};
const type_info & typeid_${CONTAINER}=typeid(some_${CONTAINER});
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
END_OF_IMPLEMENTATION
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Default implementation of ex::diff(). It prints and error message and returns a fail object.
* @see ex::diff */
return ndiff;
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
// public
#ifndef INLINE_EX_CONSTRUCTORS
+
ex::ex(const basic & other)
{
debugmsg("ex constructor from basic",LOGLEVEL_CONSTRUCT);
construct_from_basic(other);
}
-#endif
ex::ex(int i)
{
debugmsg("ex constructor from int",LOGLEVEL_CONSTRUCT);
- switch (i) { // some tiny efficiency-hack (FIXME: is this ok?)
- case -1:
- bp = _ex_1().bp;
- ++bp->refcount;
- break;
- case 0:
- bp = _ex0().bp;
- ++bp->refcount;
- break;
- case 1:
- bp = _ex1().bp;
- ++bp->refcount;
- break;
- default:
- construct_from_basic(numeric(i));
- }
+ construct_from_int(i);
}
ex::ex(unsigned int i)
{
debugmsg("ex constructor from unsigned int",LOGLEVEL_CONSTRUCT);
- construct_from_basic(numeric(i));
+ construct_from_uint(i);
}
ex::ex(long i)
{
debugmsg("ex constructor from long",LOGLEVEL_CONSTRUCT);
- construct_from_basic(numeric(i));
+ construct_from_long(i);
}
ex::ex(unsigned long i)
{
debugmsg("ex constructor from unsigned long",LOGLEVEL_CONSTRUCT);
- construct_from_basic(numeric(i));
+ construct_from_ulong(i);
}
ex::ex(double const d)
{
debugmsg("ex constructor from double",LOGLEVEL_CONSTRUCT);
- construct_from_basic(numeric(d));
+ construct_from_double(d);
}
-
+
+#endif // ndef INLINE_EX_CONSTRUCTORS
+
//////////
// functions overriding virtual functions from bases classes
//////////
GINAC_ASSERT(bp!=0);
GINAC_ASSERT(bp->flags & status_flags::dynallocated);
if (bp->refcount > 1) {
- basic * bp2=bp->duplicate();
+ basic * bp2 = bp->duplicate();
++bp2->refcount;
bp2->setflag(status_flags::dynallocated);
--bp->refcount;
- bp=bp2;
+ bp = bp2;
}
GINAC_ASSERT(bp->refcount == 1);
-}
+}
void ex::construct_from_basic(const basic & other)
{
}
} else {
if (other.flags & status_flags::dynallocated) {
- bp=&const_cast<basic &>(other);
+ bp = &const_cast<basic &>(other);
} else {
- bp=other.duplicate();
+ bp = other.duplicate();
bp->setflag(status_flags::dynallocated);
}
GINAC_ASSERT(bp!=0);
GINAC_ASSERT(bp->flags & status_flags::dynallocated);
}
+void ex::construct_from_int(int i)
+{
+ switch (i) { // some tiny efficiency-hack
+ case -2:
+ bp = _ex_2().bp;
+ ++bp->refcount;
+ break;
+ case -1:
+ bp = _ex_1().bp;
+ ++bp->refcount;
+ break;
+ case 0:
+ bp = _ex0().bp;
+ ++bp->refcount;
+ break;
+ case 1:
+ bp = _ex1().bp;
+ ++bp->refcount;
+ break;
+ case 2:
+ bp = _ex2().bp;
+ ++bp->refcount;
+ break;
+ default:
+ bp = new numeric(i);
+ bp->setflag(status_flags::dynallocated);
+ ++bp->refcount;
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ GINAC_ASSERT(bp->refcount=1);
+ }
+}
+
+void ex::construct_from_uint(unsigned int i)
+{
+ switch (i) { // some tiny efficiency-hack
+ case -2:
+ bp = _ex_2().bp;
+ ++bp->refcount;
+ break;
+ case -1:
+ bp = _ex_1().bp;
+ ++bp->refcount;
+ break;
+ case 0:
+ bp = _ex0().bp;
+ ++bp->refcount;
+ break;
+ case 1:
+ bp = _ex1().bp;
+ ++bp->refcount;
+ break;
+ case 2:
+ bp = _ex2().bp;
+ ++bp->refcount;
+ break;
+ default:
+ bp = new numeric(i);
+ bp->setflag(status_flags::dynallocated);
+ ++bp->refcount;
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ GINAC_ASSERT(bp->refcount=1);
+ }
+}
+
+void ex::construct_from_long(long i)
+{
+ switch (i) { // some tiny efficiency-hack
+ case -2:
+ bp = _ex_2().bp;
+ ++bp->refcount;
+ break;
+ case -1:
+ bp = _ex_1().bp;
+ ++bp->refcount;
+ break;
+ case 0:
+ bp = _ex0().bp;
+ ++bp->refcount;
+ break;
+ case 1:
+ bp = _ex1().bp;
+ ++bp->refcount;
+ break;
+ case 2:
+ bp = _ex2().bp;
+ ++bp->refcount;
+ break;
+ default:
+ bp = new numeric(i);
+ bp->setflag(status_flags::dynallocated);
+ ++bp->refcount;
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ GINAC_ASSERT(bp->refcount=1);
+ }
+}
+
+void ex::construct_from_ulong(unsigned long i)
+{
+ switch (i) { // some tiny efficiency-hack
+ case -2:
+ bp = _ex_2().bp;
+ ++bp->refcount;
+ break;
+ case -1:
+ bp = _ex_1().bp;
+ ++bp->refcount;
+ break;
+ case 0:
+ bp = _ex0().bp;
+ ++bp->refcount;
+ break;
+ case 1:
+ bp = _ex1().bp;
+ ++bp->refcount;
+ break;
+ case 2:
+ bp = _ex2().bp;
+ ++bp->refcount;
+ break;
+ default:
+ bp = new numeric(i);
+ bp->setflag(status_flags::dynallocated);
+ ++bp->refcount;
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ GINAC_ASSERT(bp->refcount=1);
+ }
+}
+
+void ex::construct_from_double(double d)
+{
+ bp = new numeric(d);
+ bp->setflag(status_flags::dynallocated);
+ ++bp->refcount;
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ GINAC_ASSERT(bp->refcount=1);
+}
+
//////////
// static member variables
//////////
// none
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "operators.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class ex;
class expand_options;
class symbol;
class lst;
-extern const ex & _ex0(void); /* FIXME: should this pollute headers? */
+// Sorry, this is the only constant to pollute the global scope, the other ones
+// are defined in utils.h and not visible from outside.
+extern const ex & _ex0(void); // single ex(numeric(0))
// typedef vector<ex> exvector;
;
#endif // def INLINE_EX_CONSTRUCTORS
- ex(int i);
- ex(unsigned int i);
- ex(long i);
- ex(unsigned long i);
- ex(double const d);
+ ex(int i)
+#ifdef INLINE_EX_CONSTRUCTORS
+ {
+ construct_from_int(i);
+#ifdef OBSCURE_CINT_HACK
+ update_last_created_or_assigned_bp();
+#endif // def OBSCURE_CINT_HACK
+ }
+#else
+;
+#endif // def INLINE_EX_CONSTRUCTORS
+
+ ex(unsigned int i)
+#ifdef INLINE_EX_CONSTRUCTORS
+ {
+ construct_from_uint(i);
+#ifdef OBSCURE_CINT_HACK
+ update_last_created_or_assigned_bp();
+#endif // def OBSCURE_CINT_HACK
+ }
+#else
+;
+#endif // def INLINE_EX_CONSTRUCTORS
+
+ ex(long i)
+#ifdef INLINE_EX_CONSTRUCTORS
+ {
+ construct_from_long(i);
+#ifdef OBSCURE_CINT_HACK
+ update_last_created_or_assigned_bp();
+#endif // def OBSCURE_CINT_HACK
+ }
+#else
+;
+#endif // def INLINE_EX_CONSTRUCTORS
+ ex(unsigned long i)
+#ifdef INLINE_EX_CONSTRUCTORS
+ {
+ construct_from_ulong(i);
+#ifdef OBSCURE_CINT_HACK
+ update_last_created_or_assigned_bp();
+#endif // def OBSCURE_CINT_HACK
+ }
+#else
+;
+#endif // def INLINE_EX_CONSTRUCTORS
+
+ ex(double const d)
+#ifdef INLINE_EX_CONSTRUCTORS
+ {
+ construct_from_double(d);
+#ifdef OBSCURE_CINT_HACK
+ update_last_created_or_assigned_bp();
+#endif // def OBSCURE_CINT_HACK
+ }
+#else
+;
+#endif // def INLINE_EX_CONSTRUCTORS
+
+
// functions overriding virtual functions from bases classes
// none
ex exncmul(const ex & rh) const;
private:
void construct_from_basic(const basic & other);
+ void construct_from_int(int i);
+ void construct_from_uint(unsigned int i);
+ void construct_from_long(long i);
+ void construct_from_ulong(unsigned long i);
+ void construct_from_double(double d);
void makewriteable();
#ifdef OBSCURE_CINT_HACK
inline void swap(ex & e1, ex & e2)
{ e1.swap(e2); }
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_EX_H__
#include "ex.h"
#include "numeric.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** A pair of expressions.
* This similar to, but slightly extended STL's pair<> but we need to account
}
};
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_EXPAIR_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#ifdef EXPAIRSEQ_USE_HASHTAB
#error "FIXME: expair_needs_further_processing not yet implemented for hashtabs, sorry. A.F."
const expairseq some_expairseq;
const type_info & typeid_expairseq=typeid(some_expairseq);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "expair.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//#define EXPAIRSEQ_USE_HASHTAB
return static_cast<const expairseq &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_EXPAIRSEQ_H__
#include "exprseq.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
bool exprseq::info(unsigned inf) const
{
return seq[i];
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "archive.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(fail, basic)
const fail some_fail;
const type_info & typeid_fail=typeid(some_fail);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class fail : public basic
{
extern const fail some_fail;
extern const type_info & typeid_fail;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_FAIL_H__
#ifndef __GINAC_FLAGS_H__
#define __GINAC_FLAGS_H__
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class expand_options {
public:
};
};
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_FLAGS_H__
#include "exprseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
// the following lines have been generated for max. ${maxargs} parameters
$declare_function_macro_namespace
// end of generated lines
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
// the following lines have been generated for max. ${maxargs} parameters
$declare_function_macro_no_namespace
// end of generated lines
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
#define REGISTER_FUNCTION(NAME,E,EF,D,S) \\
const unsigned function_index_##NAME=GiNaC::function::register_new(#NAME,E,EF,D,S);
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
#define REGISTER_FUNCTION(NAME,E,EF,D,S) \\
const unsigned function_index_##NAME=function::register_new(#NAME,E,EF,D,S);
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#define BEGIN_TYPECHECK \\
bool automatic_typecheck=true;
automatic_typecheck=false; \\
} else
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
#define TYPECHECK_INTEGER(VAR) \\
if (!(VAR).info(GiNaC::info_flags::integer)) { \\
automatic_typecheck=false; \\
} else
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
#define TYPECHECK_INTEGER(VAR) \\
if (!(VAR).info(info_flags::integer)) { \\
automatic_typecheck=false; \\
} else
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#define END_TYPECHECK(RV) \\
{} \\
return RV.hold(); \\
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class function;
// utility macros
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
#define is_ex_the_function(OBJ, FUNCNAME) \\
(is_ex_exactly_of_type(OBJ, function) && static_cast<GiNaC::function *>(OBJ.bp)->getserial() == function_index_##FUNCNAME)
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
#define is_ex_the_function(OBJ, FUNCNAME) \\
(is_ex_exactly_of_type(OBJ, function) && static_cast<function *>(OBJ.bp)->getserial() == function_index_##FUNCNAME)
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// global constants
extern const function some_function;
extern const type_info & typeid_function;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_FUNCTION_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(function, exprseq)
const function some_function;
const type_info & typeid_function=typeid(some_function);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
END_OF_IMPLEMENTATION
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(idx, basic)
if (ex_to_idx(s).symbolic) {
// If idx is in sym_lst, return the existing idx
- for (int i=0; i<sym_lst.nops(); i++) {
+ for (unsigned i=0; i<sym_lst.nops(); i++) {
if (is_ex_of_type(sym_lst.op(i), idx) && (ex_to_idx(sym_lst.op(i)).name == ex_to_idx(s).name))
return sym_lst.op(i);
}
return res;
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class idx : public basic
{
const exvector & idxv_co);
unsigned count_index(const ex & e, const ex & i);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_IDX_H__
#include "idx.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(indexed, exprseq)
const indexed some_indexed;
const type_info & typeid_indexed=typeid(some_indexed);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <string>
#include "exprseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Base class for non-commutative indexed objects */
class indexed : public exprseq
return static_cast<const indexed &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_INDEXED_H__
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// absolute value
unsigned force_include_gamma = function_index_gamma;
unsigned force_include_zeta1 = function_index_zeta1;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "function.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Absolute value. */
DECLARE_FUNCTION_1P(abs)
return is_ex_the_function(e, Order);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_INIFCNS_H__
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// Gamma-function
const unsigned function_index_psi2 = function::register_new("psi", psi2_eval, psi2_evalf, psi2_diff, psi2_series);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// exponential function
REGISTER_FUNCTION(atanh, atanh_eval, atanh_evalf, atanh_diff, NULL);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// Riemann's Zeta-function
const unsigned function_index_zeta2 = function::register_new("zeta", zeta2_eval, NULL, zeta2_diff, NULL);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(isospin, indexed)
ex s = (new isospin(n, sym_lst))->setflag(status_flags::dynallocated);
// If isospin is in sym_lst, return the existing isospin
- for (int i=0; i<sym_lst.nops(); i++) {
+ for (unsigned i=0; i<sym_lst.nops(); i++) {
if (is_ex_of_type(sym_lst.op(i), isospin) && (ex_to_isospin(sym_lst.op(i)).name == ex_to_isospin(s).name))
return sym_lst.op(i);
}
const isospin some_isospin;
const type_info & typeid_isospin=typeid(some_isospin);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <string>
#include "indexed.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Base class for isospin object */
class isospin : public indexed
return static_cast<const isospin &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_ISOSPIN_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(lorentzidx, idx)
if (ex_to_lorentzidx(s).symbolic) {
// If lorentzidx is in sym_lst, return the existing lorentzidx
- for (int i=0; i<sym_lst.nops(); i++) {
+ for (unsigned i=0; i<sym_lst.nops(); i++) {
if (is_ex_of_type(sym_lst.op(i), lorentzidx) && (ex_to_lorentzidx(sym_lst.op(i)).name == ex_to_lorentzidx(s).name))
return sym_lst.op(i);
}
const lorentzidx some_lorentzidx;
const type_info & typeid_lorentzidx=typeid(some_lorentzidx);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <vector>
#include "idx.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class lorentzidx : public idx
{
return static_cast<const lorentzidx &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_LORENTZIDX_H__
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
// simplification of sum=sum of simplifications
if (is_ex_exactly_of_type(e_expanded,add)) {
ex sum=_ex0();
- for (int i=0; i<e_expanded.nops(); ++i) {
+ for (unsigned i=0; i<e_expanded.nops(); ++i) {
sum += simplify_lortensor(e_expanded.op(i));
}
return sum;
return *d;
}
-#ifndef NO_GINAC_NAMESPACE
+//////////
+// global constants
+//////////
+
+const lortensor some_lortensor;
+const type_info & typeid_lortensor=typeid(some_lortensor);
+
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "indexed.h"
#include "lorentzidx.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Base class for lortensor object */
class lortensor : public indexed
// friend lortensor lortensor_delta(const ex & mu, const ex & nu);
friend lortensor lortensor_epsilon(const ex & mu, const ex & nu,
const ex & rho, const ex & sigma);
- friend lortensor lortensor_rankn(const string & n, const exvector & iv);
+ // friend lortensor lortensor_rankn(const string & n, const exvector & iv);
friend lortensor lortensor_rank1(const string & n, const ex & mu);
friend lortensor lortensor_rank2(const string & n, const ex & mu, const ex & nu);
friend ex simplify_lortensor_mul(const ex & m);
// global constants
- extern const lortensor some_lortensor;
- extern const type_info & typeid_lortensor;
+extern const lortensor some_lortensor;
+extern const type_info & typeid_lortensor;
// utility functions
ex simplify_lortensor(const ex & e);
ex Dim(void);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_LORTENSOR_H__
#include "lst.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
bool lst::info(unsigned inf) const
{
return basic::info(inf);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(matrix, basic)
const matrix some_matrix;
const type_info & typeid_matrix=typeid(some_matrix);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Symbolic matrices. */
class matrix : public basic
return static_cast<const matrix &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_MATRIX_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(mul, expairseq)
const mul some_mul;
const type_info & typeid_mul=typeid(some_mul);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "expairseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Product of expressions. */
class mul : public expairseq
return static_cast<const mul &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_MUL_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(ncmul, exprseq)
status_flags::evaluated);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "exprseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Non-commutative product of expressions. */
class ncmul : public exprseq
return static_cast <const ncmul &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_NCMUL_H__
#include "symbol.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// If comparing expressions (ex::compare()) is fast, you can set this to 1.
// Some routines like quo(), rem() and gcd() will then return a quick answer
{
if (is_ex_exactly_of_type(e, mul)) {
ex c = _ex1();
- for (int i=0; i<e.nops(); i++)
+ for (unsigned i=0; i<e.nops(); i++)
c *= multiply_lcm(e.op(i), lcmcoeff(e.op(i), _num1()));
return c;
} else if (is_ex_exactly_of_type(e, add)) {
ex c = _ex0();
- for (int i=0; i<e.nops(); i++)
+ for (unsigned i=0; i<e.nops(); i++)
c += multiply_lcm(e.op(i), lcm);
return c;
} else if (is_ex_exactly_of_type(e, power)) {
ex numeric::smod(const numeric &xi) const
{
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
return GiNaC::smod(*this, xi);
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
return ::smod(*this, xi);
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
}
ex add::smod(const numeric &xi) const
epvector::const_iterator itend = seq.end();
while (it != itend) {
GINAC_ASSERT(!is_ex_exactly_of_type(it->rest,numeric));
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
numeric coeff = GiNaC::smod(ex_to_numeric(it->coeff), xi);
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
numeric coeff = ::smod(ex_to_numeric(it->coeff), xi);
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
if (!coeff.is_zero())
newseq.push_back(expair(it->rest, coeff));
it++;
}
GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
numeric coeff = GiNaC::smod(ex_to_numeric(overall_coeff), xi);
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
numeric coeff = ::smod(ex_to_numeric(overall_coeff), xi);
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
return (new add(newseq,coeff))->setflag(status_flags::dynallocated);
}
#endif // def DO_GINAC_ASSERT
mul * mulcopyp=new mul(*this);
GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
mulcopyp->overall_coeff = GiNaC::smod(ex_to_numeric(overall_coeff),xi);
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
mulcopyp->overall_coeff = ::smod(ex_to_numeric(overall_coeff),xi);
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
mulcopyp->clearflag(status_flags::evaluated);
mulcopyp->clearflag(status_flags::hash_calculated);
return mulcopyp->setflag(status_flags::dynallocated);
ex g = _ex1();
ex acc_ca = _ex1();
ex part_b = b;
- for (int i=0; i<a.nops(); i++) {
+ for (unsigned i=0; i<a.nops(); i++) {
ex part_ca, part_cb;
g *= gcd(a.op(i), part_b, &part_ca, &part_cb, check_args);
acc_ca *= part_ca;
ex g = _ex1();
ex acc_cb = _ex1();
ex part_a = a;
- for (int i=0; i<b.nops(); i++) {
+ for (unsigned i=0; i<b.nops(); i++) {
ex part_ca, part_cb;
g *= gcd(part_a, b.op(i), &part_ca, &part_cb, check_args);
acc_cb *= part_cb;
return e;
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#ifndef __GINAC_NORMAL_H__
#define __GINAC_NORMAL_H__
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class ex;
class symbol;
// Square-free factorization of a polynomial a(x)
extern ex sqrfree(const ex &a, const symbol &x);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_NORMAL_H__
#include <cl_numtheory.h>
#endif // def HAVE_CLN_CLN_H
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// linker has no problems finding text symbols for numerator or denominator
//#define SANE_LINKER
return false;
}
+ex numeric::eval(int level) const
+{
+ // Warning: if this is ever gonna do something, the ex ctors from all kinds
+ // of numbers should be checking for status_flags::evaluated.
+ return this->hold();
+}
+
/** Cast numeric into a floating-point object. For example exact numeric(1) is
* returned as a 1.0000000000000000000000 and so on according to how Digits is
* currently set.
bool _numeric_digits::too_late = false;
+
+//////////
+// utility functions
+//////////
+
+const numeric &ex_to_numeric(const ex &e)
+{
+ return static_cast<const numeric &>(*e.bp);
+}
+
/** Accuracy in decimal digits. Only object of this type! Can be set using
* assignment from C++ unsigned ints and evaluated like any built-in type. */
_numeric_digits Digits;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class cl_N; // We want to include cln.h only in numeric.cpp in order to
// avoid namespace pollution and keep compile-time low.
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#define HASHVALUE_NUMERIC 0x80000001U
void printtree(ostream & os, unsigned indent) const;
void printcsrc(ostream & os, unsigned type, unsigned precedence=0) const;
bool info(unsigned inf) const;
+ ex eval(int level=0) const;
ex evalf(int level=0) const;
ex diff(const symbol & s) const;
ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
ex CatalanEvalf(void);
// utility functions
-inline const numeric &ex_to_numeric(const ex &e)
-{
- return static_cast<const numeric &>(*e.bp);
-}
+const numeric &ex_to_numeric(const ex &e);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_NUMERIC_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// binary arithmetic operators ex with ex
throw(std::logic_error("input from streams not yet implemented"));
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <iostream>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class ex;
class numeric;
ostream & operator<<(ostream & os, const ex & e);
istream & operator>>(istream & is, ex & e);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_OPERATORS_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(power, basic)
return power(a,_ex1_2());
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class numeric;
class add;
* expression. */
ex sqrt(const ex & a);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_POWER_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(pseries, basic)
const pseries some_pseries;
const type_info & typeid_pseries = typeid(some_pseries);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "expairseq.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** This class holds a extended truncated power series (positive and negative
* integer powers). It consists of expression coefficients (only non-zero
return (static_cast<const pseries &>(*e.bp).convert_to_poly(true));
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_SERIES_H__
#include "registrar.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
registered_class_info *first_registered_class = NULL;
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include <string>
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class registered_class_info;
class ex;
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername) \
public: \
typedef supername inherited; \
-\
- /** This structure stores information about the class. */ \
static registered_class_info reg_info; \
-\
- /** Return pointer to class name. */ \
virtual const char *class_name(void) const; \
-\
classname(const archive_node &n, const lst &sym_lst); \
virtual void archive(archive_node &n) const; \
static ex unarchive(const archive_node &n, const lst &sym_lst); \
extern unarch_func find_unarch_func(const string &class_name);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_REGISTRAR_H__
#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(relational, basic)
const relational some_relational;
const type_info & typeid_relational=typeid(some_relational);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** This class holds a relation consisting of two expressions and a logical
* relation between them. */
return static_cast<const relational &>(*e.bp);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_RELATIONAL_H__
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
return spmapkey(strstrpair(v1.name,v2.name),anon);
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "indexed.h"
#include "lorentzidx.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
typedef pair<string,string> strstrpair;
typedef pair<strstrpair,lorentzidx> spmapkey;
ex simplify_simp_lor(const ex & e, const scalar_products & sp);
ex Dim(void);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef _SIMP__GINAC_LOR_H__
#include "structure.h"
#include "debugmsg.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
const structure some_structure;
const type_info & typeid_structure=typeid(some_structure);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
struct registered_structure_info {
const char * name;
extern const structure some_structure;
extern const type_info & typeid_structure;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_STRUCTURE_H__
#include "structure.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
class ${STRUCTURE} : public structure
{
#define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef _${STRUCTURE_UC}_H_
#include "${STRUCTURE}.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
const type_info & typeid_${STRUCTURE}=typeid(some_${STRUCTURE});
const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}");
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
END_OF_IMPLEMENTATION
#include "debugmsg.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(symbol, basic)
ex s = (new symbol(n, sym_lst))->setflag(status_flags::dynallocated);
// If symbol is in sym_lst, return the existing symbol
- for (int i=0; i<sym_lst.nops(); i++) {
+ for (unsigned i=0; i<sym_lst.nops(); i++) {
if (is_ex_of_type(sym_lst.op(i), symbol) && (ex_to_symbol(sym_lst.op(i)).name == ex_to_symbol(s).name))
return sym_lst.op(i);
}
{
}
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "basic.h"
#include "ex.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Basic CAS symbol. It has a name because it must know how to output itself.
* It may be assigned an expression, but this feature is only intended for
inline int ldegree(const symbol & a, const symbol & s)
{ return a.ldegree(s); }
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_SYMBOL_H__
#ifndef __GINAC_TINFOS_H__
#define __GINAC_TINFOS_H__
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
const unsigned TINFO_basic = 0x00000001U;
const unsigned TINFO_coloridx = 0x000d1001U;
const unsigned TINFO_lorentzidx = 0x000d1002U;
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_TINFOS_H__
#include "numeric.h"
#include "utils.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
/** Integer binary logarithm */
unsigned log2(unsigned n)
// none
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#include "config.h"
#include "assertion.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
template<class T>
string ToString(T const & t)
const numeric & _num120(void); // 120
const ex & _ex120(void);
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_UTILS_H__
DOXYGEN = @DOXYGEN@
DVIPS = @DVIPS@
FIG2DEV = @FIG2DEV@
+GINACCINTDIR = @GINACCINTDIR@
GINACLIB_BINARY_AGE = @GINACLIB_BINARY_AGE@
GINACLIB_CPPFLAGS = @GINACLIB_CPPFLAGS@
GINACLIB_INTERFACE_AGE = @GINACLIB_INTERFACE_AGE@
LATEX = @LATEX@
LD = @LD@
LEX = @LEX@
+LIBGINACCINT = @LIBGINACCINT@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LT_AGE = @LT_AGE@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
.br
Alexander Frink <Alexander.Frink@uni-mainz.de>
.br
-Richard B. Kreckel <Richard.Kreckel@uni-mainz.de>
+Richard Kreckel <Richard.Kreckel@uni-mainz.de>
.SH SEE ALSO
GiNaC Tutorial \- An open framework for symbolic computation within the
C++ programming language
#include "ginac.h"
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
// yacc stack type
#define YYSTYPE ex
}
// All registered GiNaC functions
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
void GiNaC::ginsh_get_ginac_functions(void)
-#else // ndef NO_GINAC_NAMESPACE
+#else // ndef NO_NAMESPACE_GINAC
void ginsh_get_ginac_functions(void)
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
{
vector<registered_function_info>::const_iterator i = function::registered_functions().begin(), end = function::registered_functions().end();
unsigned serial = 0;