Re: [Factor-talk] matrices

2013-02-07 Thread Alex Vondrak
On Thu, Feb 7, 2013 at 4:24 PM, Leonard P wrote: > Also looking for an example implementation of a virtual sequence. > http://docs.factorcode.org/search?search=virtual+sequence takes you to http://docs.factorcode.org/content/article-virtual-sequences.html which, for instance, takes you to http:/

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
Would like to see math.matrices implemented with shaped arrays one day. -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http:/

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
The high-level-stack-language is so beautiful, and Factor is the only one around afaik. Given a large enough vocabulary, Factor would outshine Python, Numpy, Matlab, Mathematica, etc. -- Free Next-Gen Firewall Hardware Off

Re: [Factor-talk] matrices

2013-02-07 Thread Doug Coleman
I started an n-dimensional array implementation in extra/arrays/shaped. Check out this paper on numpy's nd-array: http://arxiv.org/pdf/1102.1523.pdf The key concepts are having a continuous underlying array, using a shape slot that can reshape to any other shape with the same product without chang

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
Also looking for an example implementation of a virtual sequence. -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.

Re: [Factor-talk] matrices

2013-02-07 Thread Alex Vondrak
On Thu, Feb 7, 2013 at 4:11 PM, Leonard P wrote: > Before going that far, not sure how to define constructors and make-matrix. > http://docs.factorcode.org/content/article-tuples.html and in particular http://docs.factorcode.org/content/article-tuple-constructors.html may be of help, if you aren

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
The tuple is defined ... TUPLE: matrix { coefficient initial: 1 } { #rows integer initial: 0 } { #cols integer initial: 0 } { data } ; The idea is to store an n-by-m matrix as a flat sequence, instead of an array of arrays. To accomplish this we map element subscripts, (row, col), to a singl