File:  [CENS] / python / pyGiNaC / doc / index.html
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Wed Mar 13 18:57:23 2002 UTC (15 years, 8 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Fixed typo

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META name="Author" content="Pearu Peterson">
<!-- You may add here some keywords (comma separeted list) -->
<META name="Keywords" content="python,ginac,interface,pyginac,boost,bpl">
<TITLE>PyGiNaC - Python Interface to GiNaC</TITLE>
<LINK rel="stylesheet" type="text/css" href="/styles/userstyle.css">
</HEAD>

<BODY>
<!-- Begin of user text -->
<H1>PyGiNaC &shy; Python Interface to GiNaC</H1>
by <em>Pearu Peterson</em>

<h2>What's new?</h2>

<dl>
  <dt> August 24, 2001
  <dd> Work-in-progress release. Version 0.6.
  <dt> April 27, 2001
  <dd> First pre-release. <a href="Release-0.4.txt">Version 0.4</a>.
</dl>


<h2>Introduction</h2>

<p>
PyGiNaC is a <a href="http://www.python.org/">Python</a> package that provides an interface to C++ library
<a href="http://www.ginac.de/">GiNaC - GiNaC is Not a CAS</a>. <a
href="http://www.ginac.de/">GiNaC</a> is open framework for symbolic 
computation within the C++ programming language.
See <a href="http://www.ginac.de/tutorial/">GiNaC tutorial</a> for
more information about GiNaC capabilities and limitations.

<p>
Currently PyGiNaC exposes the following GiNaC classes to Python:
<dl>
  <dt><code>symbol</code>
  <dd>Basic CAS symbols.
  <dt><code>numeric</code>
  <dd>Wrapper of CLN-numbers.
  <dt><code>constant</code>
  <dd>Symbols with specific numerical value.
  <dt><code>add</code>, <code>mul</code>, <code>power</code>,
      <code>ncmul</code>
  <dd>Arithmetic operations with symbolic objects.
  <dt><code>matrix</code>
  <dd>Symbolic matrices. [NOT Impl.]
  <dt><code>pseries</code>
  <dd>Extended truncated power series. [NOT Impl.]
  <dt><code>relational</code>
  <dd>Logical relations between two expressions.
  <dt><code>function</code>
  <dd>Symbolic functions.
  <dt><code>lst</code>
  <dd>GiNaC native container of symbolic objects.
</dl>
Other GiNaC classes such as <code>indexed</code>,
<code>idx</code>, etc. will be wrapped soon. 

<p>
All GiNaC's symbolic classes are exposed to Python through a light-weighted
wrapper class <code>ex</code>.

<p>
Currently PyGiNaC lacks tutorial for Python users. But to get started,
see <a href="http://www.ginac.de/tutorial/">GiNaC tutorial</a> and
doctest strings in <a href="ginac.doc.html">ginac.doc.html</a>.


<h3>Requirements</h3>
<ol>
  <li> <a href="http://www.python.org/download/">Python</a> (2.1 or
      later, partial support (only PyGiNaC-0.4) is available also for Python 1.5.2 and
      2.0 - see notes below).
  <li> <a href="http://www.ginac.de/">GiNaC - GiNaC is Not a CAS</a> (0.8.1 or later, PyGiNaC-0.6 requires 0.9.4). GiNaC requires
      <ol>
	<li><a
	    href="http://clisp.cons.org/~haible/packages-cln.html">CLN
	    - Common Lisp Numbers</a> (1.1 or later).
	    Note that CLN optionally supports <a
	    href="http://www.swox.com/gmp/">GMP</a>
	    (3.1.1 or later)
	    and it is highly recommended for better performance.
	    See <a href="http://www.lundman.net/unix/unixtools.html">Lundman's Unix Projects</a> for MSVC port of the GMP library.
      </ol>
  <li> <a href="http://www.boost.org/">Boost.Python</a> (1.21.1 or
      later). For your convenience, a lite version of Boost.Python is
      included with the PyGiNaC package. 
</ol>

<h3>Download</h3>

<dl>
  <dt> Snapshots of the pre-release:
  <dd> <a href="rel-0.x">rel-0.x</a>/<a href="rel-0.x/PyGiNaC-0.latest.tar.gz">PyGiNaC-0.latest.tar.gz</a>
</dl>

<h3>Installation</h3>

It is crucial that you first install required version of GiNaC.
<p>
To install <code>PyGiNaC</code>, unpack the source file, change to directory <code>PyGiNaC-?.?.?</code> and
run <code>python setup4.py install</code>.
To test <code>PyGiNaC</code>, run <code>cd test4 && python test_all.py</code>.

<h3>Platform/Compiler/Version Related Notes</h3>

<p>
<code>PyGiNaC</code> is developed on Intel Linux (Debian Potato,
Redhat Mandrake 7.0) with <a href="http://gcc.gnu.org/">gcc</a>
(2.95.2) compiler. If you are able to build GiNaC and CLN then there
should be no problems to compile and use PyGiNaC.
Target Python version is currently 2.1.

<p>
[Applies only for PyGiNaC-0.4:]
<code>PyGiNaC</code> compiles also for Python 2.0 but be aware that
due to the changes of coersion rules in Python 2.1 incorrect behaviour
is expected when using it with Python 2.0.
For example, multiplication <code>a * b</code> of symbolic objects is carried
out in Python 2.0 as <code>b.__mul__(a)</code> (for some reasons that I don't
understand). This will affect results where multiplication is
non-commutative, for example, matrix multiplication.
[This is fixed now for Python 2.0 and earlier, but there are no guarantees.]
<p>
[Applies only for PyGiNaC-0.4:]
To compile <code>PyGiNaC</code> for Python 1.5, change to directory
<code>PyGiNaC-?.?.?/python1.5</code>, run <code>make install</code>
(if that fails, study <code>Makefile</code> and change it to your
needs). Note that in Python 1.5 user-defined symbolic
functions are not supported (but it is not impossible to use
them under Python 1.5, study <code>ginac.build_function()</code> and
try to adapt its Python 2.1 code to Python 1.5).

<h3>Mailing list</h3>

There is a mailing list <a
href="http://cens.ioc.ee/pipermail/pyginac/">pyginac</a> 
open for PyGiNaC support/bug reports/suggestions.
You can subscribe the list <a href="http://cens.ioc.ee/mailman/listinfo/pyginac">here</a>.

<h3><a href="http://cens.ioc.ee/cgi-bin/cvsweb/python/pyGiNaC/">CVS Repository</a></h3>

<code>PyGiNaC</code> is being developed under
<a href="http://www.sourcegear.com/CVS">CVS</a> and those who are
interested in the really latest version of <code>PyGiNaC</code> (possibly
unstable) can get it from the repository as follows:
<ol>
  <li> First you need to login (the password is <code>guest</code>):
<pre>
> cvs -d :pserver:anonymous@cens.ioc.ee:/home/cvs login
</pre>
  <li> and then do the checkout:
<pre>
> cvs -z6 -d :pserver:anonymous@cens.ioc.ee:/home/cvs checkout pyGiNaC
</pre>
  <li> In the directory <code>pyGiNaC</code> you can get the updates by hitting
<pre>
> cvs -z6 update -P -d
</pre>
</ol>
You can browse <code>PyGiNaC</code> CVS repository <a href="http://cens.ioc.ee/cgi-bin/cvsweb/python/pyGiNaC/">here</a>.

<h3>What can You do for PyGiNaC and GiNaC?</h3>

While using PyGiNaC you'll certainly find that there are many things
that can be improved and many things that are missing compared to
other CAS'es. The list of PyGiNaC features depends very much on the
GiNaC capabilities. So, there are two branches where you can
contribute to make symbolic calculations possible in Python:
<ol>
  <li>Development of GiNaC and its extensions. See <a
      href="http://www.ginac.de/">GiNaC homepage</a> for more details.
  <li>Development of an interface between GiNaC and Python (PyGiNaC).
      And Python extensions to PyGiNaC.
      Here is a list of tasks where volunteers are most welcome:
      <dl>
	<dt>Pretty-printing of symbolic expressions from Python (or
	    better yet, from GiNaC)
	<dd>There are two tools that can be used here:
	    1) <a href="http://www.lfw.org/math/">MINSE</a>,
	    2) <a href="http://dione.ids.pl/~pborys/software/linux/">eqascii</a>.
	<dt>PyGiNaC Tutorial
	<dd>... requires someone fluent in English and damned with
	    the Python language:-).
	<dt>...
	<dd>
      </dl>
</ol>


<h2>Related sites</h2>

<ol>
  <li> <a href="http://www.research.att.com/~bs/bs_faq.html" target="_top">Bjarne Stroustrup's FAQ about C++ language</a>.
      
</ol>
<!-- End of user text -->
<HR>
<ADDRESS>
<A href="http://cens.ioc.ee/~pearu/" target="_top">Pearu Peterson</A>
<A href="mailto:pearu@cens.ioc.ee">&lt;pearu@cens.ioc.ee&gt;</A><BR>
<!-- hhmts end -->
Last modified: Fri Jan 12 16:44:25 EET 2001
<!-- hhmts end -->
</ADDRESS>

</BODY>
</HTML>




FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>