Boost logo

Boost Users :

From: Stephen Henry (Stephen.Henry_at_[hidden])
Date: 2006-04-06 04:55:46


It's quite a nice idea, but I'm not too sure why anyone would want to
use it. There are already a number of optimised and fully featured
mathematical libraries out there. Without somesort a capability for
algebraic manipulation, for example, the ability to determine the value
of a variable within an equation given a number of relations (which
coincidently would be really useful, but non-trivial to implement), the
library basically amounts to some santatic sugar.

What I find interesting, however, is the named associations for function
arguments ( x -> 5 ), for example, but I think there is already a
library in Boost that enables such functionality.

S.

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Stephen Gross
Sent: 04 April 2006 18:29
To: Boost
Subject: [Boost-users] Idea for equation library

I've got an idea for a toolkit that uses boost::lambda to let you write
'equations' on the fly in c++. For instance, consider the following
pseudo-code:

==================
Equation e = x + y;
print e(x -> 5, y -> 10) // Prints 15
e = x - y
print e(x -> 5, y -> 10) // Prints -5
Equation d = eq(e) + z
print d(x -> 1, y -> 2, z -> 3) // Prints 2 ==================

The idea is that you can encapsulate an algebraic function in a
standalone 'Equation' instance, and dynamically reassign that equation.
It's built off of boost::lambda (of course), but it lets you name the
variables rather than just refer to them with the standard placeholders
(_1, _2, etc.). Is it worthwhile for me to post the toolkit code on this
group?

Thanks,
--Steve

Stephen Gross
Case Western School of Medicine
Cleveland, OH

"By Grabthar's hammer, by the sons of Worvan, you shall be avenged." -
Dr.
Lazarus

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net