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 (16 years, 7 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Fixed typo

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">
<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">

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

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

  <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>.


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

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

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

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

  <li> <a href="">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="">GiNaC - GiNaC is Not a CAS</a> (0.8.1 or later, PyGiNaC-0.6 requires 0.9.4). GiNaC requires
	    - Common Lisp Numbers</a> (1.1 or later).
	    Note that CLN optionally supports <a
	    (3.1.1 or later)
	    and it is highly recommended for better performance.
	    See <a href="">Lundman's Unix Projects</a> for MSVC port of the GMP library.
  <li> <a href="">Boost.Python</a> (1.21.1 or
      later). For your convenience, a lite version of Boost.Python is
      included with the PyGiNaC package. 


  <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>


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

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

<code>PyGiNaC</code> is developed on Intel Linux (Debian Potato,
Redhat Mandrake 7.0) with <a href="">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.

[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.]
[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
open for PyGiNaC support/bug reports/suggestions.
You can subscribe the list <a href="">here</a>.

<h3><a href="">CVS Repository</a></h3>

<code>PyGiNaC</code> is being developed under
<a href="">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:
  <li> First you need to login (the password is <code>guest</code>):
> cvs -d login
  <li> and then do the checkout:
> cvs -z6 -d checkout pyGiNaC
  <li> In the directory <code>pyGiNaC</code> you can get the updates by hitting
> cvs -z6 update -P -d
You can browse <code>PyGiNaC</code> CVS repository <a href="">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:
  <li>Development of GiNaC and its extensions. See <a
      href="">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:
	<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="">MINSE</a>,
	    2) <a href="">eqascii</a>.
	<dt>PyGiNaC Tutorial
	<dd>... requires someone fluent in English and damned with
	    the Python language:-).

<h2>Related sites</h2>

  <li> <a href="" target="_top">Bjarne Stroustrup's FAQ about C++ language</a>.
<!-- End of user text -->
<A href="" target="_top">Pearu Peterson</A>
<A href="">&lt;;</A><BR>
<!-- hhmts end -->
Last modified: Fri Jan 12 16:44:25 EET 2001
<!-- hhmts end -->


FreeBSD-CVSweb <>