home *** CD-ROM | disk | FTP | other *** search
Wrap
Newsgroups: sci.math.symbolic Path: sparky!uunet!darwin.sura.net!wupost!gumby!destroyer!news.iastate.edu!pv343f.vincent.iastate.edu!whitmore From: whitmore@iastate.edu (Kurt D Whitmore) Subject: Re: Symbolic Algebra subroutine library? Message-ID: <whitmore.712081194@pv343f.vincent.iastate.edu> Sender: news@news.iastate.edu (USENET News System) Organization: Iowa State University, Ames IA References: <1992Jul24.224350.12931@cco.caltech.edu> Date: Sat, 25 Jul 1992 16:19:54 GMT Lines: 49 In <1992Jul24.224350.12931@cco.caltech.edu> terry@wag.caltech.edu (Terry R. Coley) writes: >I would like to know if there is a symbolic algebra subroutine >library suitable for linking to C/C++ programs. More specifically, >I would like to use the algebraic manipulation capabilities of a >package like Mathematica (as just one example) available from >within a compiled and linked program. For example, the program >might construct an expression like (a + b)(c + d) represented >internally in some data structure (maybe a tree, maybe just a >string). Then, a subroutine called with this expression as an >argument would perform an operation on the expression and return >the result in the same data structure type. For example, a routine >called multiply might return ac + ad + bc + bd in the data structure. >After watching this news group for a few weeks, it appears most >symbolic work is done through front ends like that with Mathematica >or Maple. Do either of these have an API (application programmer >interface) for accessing their functionality? >Some people have suggested shelling out a separate process to >run Mathematica and then parse the resulting output. This is >not acceptable for a variety of reasons, not the least of which >are speed, portability, etc. My program will be generating >hundreds of expressions, doing simplifications, and using the >results. For now I have programmed the simple expression tree >simplifications myself, including some simple derivatives. But >as the expressions the program creates become more complex, I >will not be able to compete/reproduce the functionality of >good symbolic algebra packages. Therefore, I would like an API >to such a package! Any suggestions? >-- > - Terry >terry@wag.caltech.edu 818-397-2724 818-585-0918 (FAX) >Terry Coley, Caltech 139-74, Pasadena, CA 91125 Mathematica 2.1.x.x has totaly reworked Mathlink and has improved the documentation greatly. MathLink allows C functions to be defined externally to mathematica, much like what you want to do, and then used as functions within Mma via Mathlink. Not only can you have Mma call up C functions but you can also have C call up Mma to do calculations and pipe it back to your C program if you dont want to write code for say, a nasty integration. Kurt D. Whitmore whitmore@iastate.edu