On 12/27/15 2:00 AM, Jony Cohen wrote:
Hi, Don't know if it's exactly what you're looking for but the MADLib
package has utility function for matrix and vector operations.
see: http://doc.madlib.net/latest/group__grp__array.html

Apply an operator to al elements on an array or pair of arrays: http://theplateisbad.blogspot.com/2015/12/the-arraymath-extension-vs-plpgsql.html, https://github.com/pramsey/pgsql-arraymath.

See also http://theplateisbad.blogspot.com/2015/12/more-fortran-90-like-vector-operations.html.

BTW, if you want to simply apply a function to all elements in an array there is an internal C function array_map that can do it. There's no SQL interface to it, but it shouldn't be hard to add one.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to