Math calculation within Pipmak

View: New views
4 Messages — Rating Filter:   Alert me  

Math calculation within Pipmak

by chikitin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am very new to this. Is there any reference for type of mathematical calculations that one can do with Pipmak? For instance, is that possible to do matrix manipulations in pipmak?

thanks,

cs

Re: Math calculation within Pipmak

by Christian Walther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

chikitin wrote:
> Is there any reference for type of mathematical calculations that  
> one can do with Pipmak? For instance, is that possible to do matrix  
> manipulations in pipmak?

Pipmak uses Lua as its scripting language. For an overview of the  
built-in mathematical capabilities of Lua, see <http://www.lua.org/manual/5.0/manual.html#5.5 
 >. Matrix calculations are not among them, but it's certainly  
possible to do them "by hand" by element-wise looping over Lua lists.  
That should work well enough if all you need to do is multiplying a  
4x4 matrix to a vector, but it might not cut it if you're trying to  
diagonalize 1000x1000 matrices or something. If you need something  
more efficient, I could imagine that Lua bindings to some optimized  
numerical computation libraries exist. You might find something on the  
sites linked from <http://www.lua.org/community.html>, and if you do,  
it could probably be used in Pipmak using the extension module support  
that I'm currently working on.

Does that answer your question?

   -Christian

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Pipmak-Users mailing list
Pipmak-Users@...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users

Re: Math calculation within Pipmak

by chikitin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You certainly did. There are very good libraries for C/C++ for doing matrix calculations. I am not sure, how your extension module works.  As you said, i can always use arrays (or loop in the worse case) as a ramedy to this.

cs




Re: Math calculation within Pipmak

by Christian Walther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

chikitin wrote:
> There are very good libraries for C/C++ for doing matrix
> calculations. I am not sure, how your extension module works.

No one is, because it hasn't been completely implemented yet. :)

At the core of it would be a dynamic library / loadable module using  
the Lua C API that can be loaded using the loadlib function as  
described in the Lua manual. As I mentioned, I could imagine that  
something like that exists already, so there's a chance that you  
wouldn't have to write it yourself. Fitting it into Pipmak should then  
be straight-forward.

   -Christian

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Pipmak-Users mailing list
Pipmak-Users@...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users