Mansour,

aren't you looking for a computer-algebra system?
There's a broad amount out there, but not many in Java.
Also, parsers for formulæ exist in numerous fashions.
You may want to look at the content-mathml-oriented processors listed in the 
MathML software list.
It's full of old things too, but parsing formula is not really a new topic.

I believe ASCIIMath could do a bit of that.
I know JOME can do that too (I have an open-source version somewhere).
Many others. They often differ by purposes (e.g. what kind of term you aim at) 
and ease of use (e.g. quality of the feedback in case of errors or tolerance 
for faulty content).
I know WebEQ, for example, has a very complete support to convert presentation 
to content too but that is not open-source!

Once with a parse-tree, it is not too hard to come to a matrix.
I'd do that with a content-mathml-tree encoded in JDOM, but I am surely biassed 
towards XML!

paul

On 21 juil. 2014, at 06:18, Mansour Al Akeel <mansour.alak...@gmail.com> wrote:

> Luc and Ted, thank you for your help and support.
> I understand the dimensionality part. Indeed most of the equations I
> need to solve have one unknown.
> 
> I am looking to parse the equation from String to matrix form. I was
> not lucky enough to find any parser that can do this out-of-the-box.
> As Luc said, it will big project to write a parser that takes any
> equation as a string, and generate the matrix (2-dimensional array) to
> feed it into Commons Math.
> 
> Thank you.
> 
> 
> 
> 
> On Sun, Jul 20, 2014 at 1:30 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:
>> On Sun, Jul 20, 2014 at 12:01 AM, Luc Maisonobe <l...@spaceroots.org> wrote:
>> 
>>> There are no parser in Apache Commons Math to build such systems
>>> directly from string representations. We already discussed about this
>>> and decided not to implement parsers, as they are already big projects
>>> by themselves and depend on the syntax you want to parse. Parsers are
>>> therefore considered to be out of Apache Commons Math scope. They belong
>>> to higher level projects that could implement them for their own
>>> specific syntax, and rely on Apache Commons Math to sovle the problem
>>> once it has been translated from strings to structured numbered.
>>> 
>> 
>> Also, there are excellent parser construction systems out there to help
>> with parsing.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to