From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Jony Cohen <jony(dot)cohenjo(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Marcus Engene <mengpg2(at)engene(dot)se>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: efficient math vector operations on arrays |
Date: | 2015-12-30 00:15:17 |
Message-ID: | 56832215.5030501@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-12-30 00:35:13 | Re: cannot get stable function to use index |
Previous Message | Jim Nasby | 2015-12-30 00:03:57 | Re: cannot get stable function to use index |