Hi folks,
I would like to write a set implementation for expressions, or borrow
one, if it has already been written.
I have several questions.
1. What C++ type is best suited to representing sets?
2. Is there a hash function implemented for GiNaC expressions?
3. Can GiNaC expressions be put into some kind of canonical form?
4. (Requirement.) The hash function should be such that e.g.
a + b + c * (d + e)
and
b + (e + d) * c + a
hash to the same value.
Thanks!
Marko Riedel
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel(a)lsi.upc.edu |
| http://www.geocities.com/markoriedelde/index.html |
+-------------------------------------------------------------+
Hi folks,
I'm going to ask a very basic question, namely if you can point me to
a tutorial where GiNaC's memory managment is described. I read the
tutorial from your website but I could not find any info on this.
I am familiar with the retain/release mechanism of used by Cocoa and
GNUstep, and the use of autorelease pools. If you could compare these
concepts to their GiNaC equivalents, that would be of great help.
E.g. in Objective C I can create a tree of objects and either free
them myself or put them into an autorelease pool that will be emptied
by the runloop. How would I do this in GiNaC?
Suppose I create a matrix of rational functions, a single entry of
which I'm interested in retaining. I would like to free the matrix and
retain that one function. Can you provide a code snippet that does
this?
I would also like to know what the limitations of the linear equation
solver are. How many variables can it handle? What are the time and
space complexities of the solver in terms of the number of variables
and the number of equations?
Thanks in advance for any help you may be able to give.
Best regards,
Marko Riedel
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel(a)lsi.upc.es |
| http://www.geocities.com/markoriedelde/index.html |
+-------------------------------------------------------------+
Hi folks,
I downloaded, compiled and installed GiNaC using the following version
of gcc:
gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure
Thread model: posix
gcc version 4.0.2
I now appear to have a working setup. E.g. I can run "ginsh":
ginsh - GiNaC Interactive Shell (ginac V1.3.5)
__, _______ Copyright (C) 1999-2006 Johannes Gutenberg University Mainz,
(__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY.
._) i N a C | You are welcome to redistribute it under certain conditions.
<-------------' For details type `warranty;'.
When I compile and run my test program, however, I get the following
error message:
/usr/lib/libstdc++.so.6: version `CXXABI_1.3.1' not found \
(required by /usr/local/lib/libginac-1.3.so.2)
Am I perhaps missing some environment variables or compiler switches
here? I have the following files:
/usr/include/c++/3.3/cxxabi.h
/usr/local/include/c++/4.0.2/i686-pc-linux-gnu/bits/cxxabi_tweaks.h
/usr/local/include/c++/4.0.2/cxxabi.h
I compiled my program with the following command:
c++ -g complete41.cpp -o complete41 -I/usr/local/include -lcln -lginac
Any help would be appreciated.
Best regards,
Marko Riedel
--
+------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel(a)neuearbeit.de |
| http://www.geocities.com/markoriedelde/index.html |
+------------------------------------------------------------+
Hi folks,
I am trying to compile cln on Debian 3.1 (Kernel 2.6.12). This is my
version of gcc:
gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure
Thread model: posix
gcc version 4.0.2
This is the output from "make". I get the impression that I have to
set an environment variable to specify endianess.
cd src && make all
make[1]: Entering directory `/usr/local/src/cln-1.1.13/src'
make SUBDIR=base
make[2]: Entering directory `/usr/local/src/cln-1.1.13/src'
/bin/sh ../libtool --mode=compile g++ -O -I../include -I../include \
-I./base -c ./base/cl_N_err_d0.cc
mkdir .libs
g++ -O -I../include -I../include -I./base -c ./base/cl_N_err_d0.cc \
-fPIC -DPIC -o .libs/cl_N_err_d0.o
In file included from ./base/cl_N_err_d0.cc:4:
./base/cl_sysdep.h:30:4: error: #error "Bogus CL_CPU_BIG_ENDIAN_P!"
In file included from ./base/cl_macros.h:6,
from ./base/cl_sysdep.h:56,
from ./base/cl_N_err_d0.cc:4:
../include/cln/types.h:18:6: error: #error "No 8 bit integer type?"
../include/cln/types.h:25:6: error: #error "No 16 bit integer type?"
../include/cln/types.h:35:6: error: #error "No 32 bit integer type?"
../include/cln/types.h:57: error: 'sint8' does not name a type
../include/cln/types.h:58: error: 'uint8' does not name a type
../include/cln/types.h:60: error: 'sint16' does not name a type
../include/cln/types.h:61: error: 'uint16' does not name a type
../include/cln/types.h:63: error: 'sint32' does not name a type
../include/cln/types.h:64: error: 'uint32' does not name a type
../include/cln/types.h:128: error: 'sint32' does not name a type
../include/cln/types.h:129: error: 'uint32' does not name a type
../include/cln/number.h:194: error: expected constructor, destructor, \
or type conversion before 'CL_DEFINE_LONG_ASSIGNMENT_OPERATORS'
make[2]: *** [cl_N_err_d0.lo] Error 1
make[2]: Leaving directory `/usr/local/src/cln-1.1.13/src'
make[1]: *** [base.target] Error 2
make[1]: Leaving directory `/usr/local/src/cln-1.1.13/src'
make: *** [all] Error 2
Can you help me out here?
Thanks!
--
+------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel(a)neuearbeit.de |
| http://www.geocities.com/markoriedelde/index.html |
+------------------------------------------------------------+
Hi folks,
I installed the GiNaC Debian package on my machine. I now have
||/ Name Version Description
+++-==============-==========-==============
ii libginac-dev 1.3.0-2 The GiNaC framework (development files)
I get the following warning when I link my test program:
/usr/bin/ld: warning: libstdc++.so.5, \
needed by /usr/bin/../lib/libginac.so, \
may conflict with libstdc++.so.6
The program segfaults in GiNaC::matrix::operator= (). How do I tell
the linker to link against libstdc++.so.5 only, thereby avoiding
conflicts?
This is my version of GCC:
gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure
Thread model: posix
gcc version 4.0.2
Thanks!
--
+------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel(a)neuearbeit.de |
| http://www.geocities.com/markoriedelde/index.html |
+------------------------------------------------------------+