Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Re: Geometric Optimisation and Perl

by tsee (Curate)
on Mar 27, 2004 at 16:04 UTC ( #340267=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Geometric Optimisation and Perl
in thread Geometric Optimisation and Perl

Can't resist to give a quick answer to your question:
Being a physicist, I have indeed used Mathematica, though I generally prefer Maple for most stuff since I like the interface better. As you said, it is a question of the complexity of the optimization. I don't think you need the full power of Mathematica for this, though I haven't thought it through. If it's an If I recall correctly, the first reply in this thread pointed to a good, scientific discussion of the subject.
The reason I pointed at those Math:: modules was because before engaging in hairy XS/Inline::C library wrapping, it's probably a better idea to try with what's availlable already. If that's not good enough by a small margin, it's probably a better idea to extend what's on CPAN than to roll one's own. That doesn't mean I consider Mathematica an inadequate tool for the job.

Steffen


Comment on Re: Re: Re: Re: Geometric Optimisation and Perl
Re: Re: Re: Re: Re: Geometric Optimisation and Perl
by Vautrin (Hermit) on Mar 27, 2004 at 17:04 UTC

    You're right that if it's possible to solve the problem without using Mathematica, XS / Inline::C library wrapping, it is better to try what's available. However, I figured that I would put it out there, so that OP would know that there are other options if the problem gets complex enough.

    I'm a big fan of Perl, but to be honest, not every problem is right for it. If the OP can get a more elegant solution by using a technical computing platform like Matlab, or Mathematica (and if they can afford to), he or she may want to. However, if the OP has a reason to use Perl -- perhaps to interface with a CGI script or already existing Tk/Perl application? -- the option is there.

    I would also like to point out, that the OP doesn't have to use XS to return the values. If the solution is significantly complex, or the number is to a precision bigger then you can return via XS, or there is another reason to make XS a bad solution, it is possible to send the result over a Unix domain socket or a TCP/IP connection, or through a database, or put it in a file, or any of a number of possible solutions. Sometimes the best way to use a program is via a system() call that invokes a program that sends the data back to the program via a Unix domain socket. Of course, you're still going to have to roll your own protocol, but I figured I would put it out there so that the OP can decide what is best for his/her needs.


    Want to support the EFF and FSF by buying cool stuff? Click here.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://340267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-07-26 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls