commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Speirs <wspe...@apache.org>
Subject Re: Parsing and solving algebraic equation from string
Date Mon, 28 Jul 2014 17:22:50 GMT
For anyone who cares (and maybe we should take this off the mailing list) I
updated the now called MathBlotter to use Maven to construct the JJTree
files. It *should* compile, but fails on some tests. It will run though and
render equations in pretty LaTeX output.
https://github.com/wspeirs/MathBlotter

Again, any help would be greatly appreciated...

Bill-


On Mon, Jul 28, 2014 at 10:16 AM, William Speirs <wspeirs@apache.org> wrote:

> So here is an idea, let's not worry about where said project would live,
> but focus on implementing/working on it. I'm happy to host it off my GitHub
> and give anyone access that wants to play.
>
> If people are really interested, then we should start by speccing out what
> the "language" will look like. For example, is exponentiation going to be ^
> or **?
>
> I'd say let's start there, see how much traction we get, then we can
> figure out where/how to host it.
>
> Thoughts?
>
> Bill-
>
>
> On Mon, Jul 28, 2014 at 5:14 AM, Mansour Al Akeel <
> mansour.alakeel@gmail.com> wrote:
>
>> Paul, we are on the same page. We are looking for independent
>> component separated from apache commons-math, but as a subproject.
>> The value of keeping it under apache, is the visibility. What I have
>> in mind is a sub project "commons-math-extensions" or c-m-optional,
>> c-m-extra .. etc
>> This sub project has one maven groupId and multiple artifacts that may
>> belong to the math topic, but not a direct fit for commons-math.
>>
>> The artifacts can include "formula-parser". Other packages that do not
>> directly fit in commons-math may move there.
>> For example some may argue (and I am not suggesting this) that genetic
>> algorithm is not a direct fit for commons-math and can be moved to
>> it's own component under that umbrella.
>>
>>
>>
>>
>>
>> On Mon, Jul 28, 2014 at 2:39 AM, Paul Libbrecht <paul@hoplahup.net>
>> wrote:
>> > I am definitely in favor of an independent component such as
>> "formula-parser".
>> >
>> > paul
>> >
>> >
>> > On 28 juil. 2014, at 02:34, Mansour Al Akeel <mansour.alakeel@gmail.com>
>> wrote:
>> >
>> >> William,
>> >> I agree with you about the maturity and active community associated
>> >> with commons math.
>> >> I noticed other commons project are not as active.
>> >>
>> >> Moving to a top level project, in my own opinion is valid, since the
>> >> math topic covers a big area, unlike other projects in commons where
>> >> they solve an focus on specific problem.
>> >>
>> >> So beside the visibility (which is enough for me), what other
>> >> advantages do we get ??
>> >>
>> >> By the way, even staying as we are under commons, does not really
>> >> prevent us from building these subprojects. We may get more
>> >> contributors if we go higher level, but not too early to consider
>> >> these subprojects under commons.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, Jul 27, 2014 at 7:42 PM, William Speirs <wspeirs@apache.org>
>> wrote:
>> >>> I think the better idea would be to promote commons-math to it's own
>> >>> top-level project. It's a very impressive math library, and more
>> active
>> >>> than some of the other commons projects.
>> >>>
>> >>> If made a top-level project then we could make subprojects like a
>> parser,
>> >>> GUI, etc.
>> >>>
>> >>> Thoughts?
>> >>>
>> >>> Bill-
>> >>> On Jul 27, 2014 7:34 PM, "Mansour Al Akeel" <
>> mansour.alakeel@gmail.com>
>> >>> wrote:
>> >>>
>> >>>> William,
>> >>>> Thank you a lot.
>> >>>>
>> >>>> Is there building instructions ?
>> >>>>
>> >>>> Are there any interest in creating/adding these efforts as
>> >>>> commons-math subproject.
>> >>>> I understand and agree with the point that a parser is outside of
the
>> >>>> scope of commons-math, but may be we can create a subproject
>> >>>> "commons-math-sandbox" or "commons-math-ext" or
>> >>>> "commons-math-optional", that will host efforts and project related
>> >>>> but does not fit the scope. This will separate the concerns and
allow
>> >>>> those who need this functionality to find it easily, at the same
time
>> >>>> it will give the project a home, and make it available for wider
>> >>>> users.
>> >>>>
>> >>>> Is this a valid suggestion ?
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Mon, Jul 21, 2014 at 8:39 AM, William Speirs <wspeirs@apache.org>
>> >>>> wrote:
>> >>>>> Errr... nothing at the moment, but I'll make it Apache2 :-)
>> >>>>>
>> >>>>> Bill-
>> >>>>>
>> >>>>>
>> >>>>> On Mon, Jul 21, 2014 at 8:29 AM, Paul Libbrecht <paul@hoplahup.net>
>> >>>> wrote:
>> >>>>>
>> >>>>>> Coool. License?
>> >>>>>>
>> >>>>>> paul
>> >>>>>>
>> >>>>>>
>> >>>>>> On 21 juil. 2014, at 14:26, William Speirs <wspeirs@apache.org>
>> wrote:
>> >>>>>>
>> >>>>>>> It's certainly incomplete, but I started working on
a CAS
>> (Computer
>> >>>>>> Algebra
>> >>>>>>> System: http://en.wikipedia.org/wiki/Computer_algebra_system)
>> that
>> >>>> was
>> >>>>>>> "backed" by commons-math: https://github.com/wspeirs/math
>> >>>>>>>
>> >>>>>>> The JJT (parser file for JavaCC) file can be found here,
and is
>> fairly
>> >>>>>>> complete if I remember correctly:
>> >>>>>>>
>> >>>>>>
>> >>>>
>> https://raw.githubusercontent.com/wspeirs/Math/master/src/main/java/com/educatedsolutions/parser/Math.jjt
>> >>>>>>>
>> >>>>>>> I'd be happy to help you with it further and/or accept
pull
>> requests
>> >>>> to
>> >>>>>>> improve it :-)
>> >>>>>>>
>> >>>>>>> Bill-
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> On Mon, Jul 21, 2014 at 1:59 AM, Ted Dunning <
>> ted.dunning@gmail.com>
>> >>>>>> wrote:
>> >>>>>>>
>> >>>>>>>> On Sun, Jul 20, 2014 at 9:18 PM, Mansour Al Akeel
<
>> >>>>>>>> mansour.alakeel@gmail.com
>> >>>>>>>>> wrote:
>> >>>>>>>>
>> >>>>>>>>> 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.
>> >>>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> It actually isn't a big project.
>> >>>>>>>>
>> >>>>>>>> See http://www.antlr.org/
>> >>>>>>>>
>> >>>>>>>> The simplest example they give there is this one:
>> >>>>>>>>
>> >>>>>>>> *grammar Expr;*
>> >>>>>>>> *prog: (expr NEWLINE)* ; *
>> >>>>>>>> *expr: expr ('*'|'/') expr *
>> >>>>>>>> *    | expr ('+'|'-') expr *
>> >>>>>>>> *    | INT | '(' expr ')' ; *
>> >>>>>>>> *NEWLINE : [\r\n]+ ; INT : [0-9]+ ;*
>> >>>>>>>>
>> >>>>>>>> This will compile into a java program that parses
expressions
>> very
>> >>>> much
>> >>>>>>>> like what you want.
>> >>>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> ---------------------------------------------------------------------
>> >>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> >>>>>> For additional commands, e-mail: user-help@commons.apache.org
>> >>>>>>
>> >>>>>>
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> >>>> For additional commands, e-mail: user-help@commons.apache.org
>> >>>>
>> >>>>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> >> For additional commands, e-mail: user-help@commons.apache.org
>> >>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> > For additional commands, e-mail: user-help@commons.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message